├── .gitignore ├── .gitlab-ci.yml ├── LICENSE.md ├── Makefile ├── Makefile.common ├── README.md ├── deps ├── libchdr │ ├── LICENSE.txt │ ├── README.md │ ├── deps │ │ ├── lzma-24.05 │ │ │ ├── Asm │ │ │ │ ├── arm64 │ │ │ │ │ ├── 7zAsm.S │ │ │ │ │ └── LzmaDecOpt.S │ │ │ │ └── x86 │ │ │ │ │ ├── 7zAsm.asm │ │ │ │ │ └── LzmaDecOpt.asm │ │ │ ├── CMakeLists.txt │ │ │ ├── LICENSE │ │ │ ├── include │ │ │ │ ├── 7zTypes.h │ │ │ │ ├── 7zWindows.h │ │ │ │ ├── Alloc.h │ │ │ │ ├── Bra.h │ │ │ │ ├── Compiler.h │ │ │ │ ├── CpuArch.h │ │ │ │ ├── Delta.h │ │ │ │ ├── LzFind.h │ │ │ │ ├── LzHash.h │ │ │ │ ├── Lzma86.h │ │ │ │ ├── LzmaDec.h │ │ │ │ ├── LzmaEnc.h │ │ │ │ ├── Precomp.h │ │ │ │ ├── RotateDefs.h │ │ │ │ └── Sort.h │ │ │ └── src │ │ │ │ ├── Alloc.c │ │ │ │ ├── Bra.c │ │ │ │ ├── Bra86.c │ │ │ │ ├── BraIA64.c │ │ │ │ ├── CpuArch.c │ │ │ │ ├── Delta.c │ │ │ │ ├── LzFind.c │ │ │ │ ├── Lzma86Dec.c │ │ │ │ ├── LzmaDec.c │ │ │ │ ├── LzmaEnc.c │ │ │ │ └── Sort.c │ │ ├── zlib-1.3.1 │ │ │ ├── CMakeLists.txt │ │ │ ├── ChangeLog │ │ │ ├── FAQ │ │ │ ├── INDEX │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── Makefile.in │ │ │ ├── README │ │ │ ├── adler32.c │ │ │ ├── amiga │ │ │ │ ├── Makefile.pup │ │ │ │ └── Makefile.sas │ │ │ ├── compress.c │ │ │ ├── configure │ │ │ ├── contrib │ │ │ │ ├── README.contrib │ │ │ │ ├── ada │ │ │ │ │ ├── buffer_demo.adb │ │ │ │ │ ├── mtest.adb │ │ │ │ │ ├── read.adb │ │ │ │ │ ├── readme.txt │ │ │ │ │ ├── test.adb │ │ │ │ │ ├── zlib-streams.adb │ │ │ │ │ ├── zlib-streams.ads │ │ │ │ │ ├── zlib-thin.adb │ │ │ │ │ ├── zlib-thin.ads │ │ │ │ │ ├── zlib.adb │ │ │ │ │ ├── zlib.ads │ │ │ │ │ └── zlib.gpr │ │ │ │ ├── blast │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README │ │ │ │ │ ├── blast.c │ │ │ │ │ ├── blast.h │ │ │ │ │ ├── test.pk │ │ │ │ │ └── test.txt │ │ │ │ ├── delphi │ │ │ │ │ ├── ZLib.pas │ │ │ │ │ ├── ZLibConst.pas │ │ │ │ │ ├── readme.txt │ │ │ │ │ └── zlibd32.mak │ │ │ │ ├── dotzlib │ │ │ │ │ ├── DotZLib.build │ │ │ │ │ ├── DotZLib.chm │ │ │ │ │ ├── DotZLib.sln │ │ │ │ │ ├── DotZLib │ │ │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ │ │ ├── ChecksumImpl.cs │ │ │ │ │ │ ├── CircularBuffer.cs │ │ │ │ │ │ ├── CodecBase.cs │ │ │ │ │ │ ├── Deflater.cs │ │ │ │ │ │ ├── DotZLib.cs │ │ │ │ │ │ ├── DotZLib.csproj │ │ │ │ │ │ ├── GZipStream.cs │ │ │ │ │ │ ├── Inflater.cs │ │ │ │ │ │ └── UnitTests.cs │ │ │ │ │ ├── LICENSE_1_0.txt │ │ │ │ │ └── readme.txt │ │ │ │ ├── gcc_gvmat64 │ │ │ │ │ └── gvmat64.S │ │ │ │ ├── infback9 │ │ │ │ │ ├── README │ │ │ │ │ ├── infback9.c │ │ │ │ │ ├── infback9.h │ │ │ │ │ ├── inffix9.h │ │ │ │ │ ├── inflate9.h │ │ │ │ │ ├── inftree9.c │ │ │ │ │ └── inftree9.h │ │ │ │ ├── iostream │ │ │ │ │ ├── test.cpp │ │ │ │ │ ├── zfstream.cpp │ │ │ │ │ └── zfstream.h │ │ │ │ ├── iostream2 │ │ │ │ │ ├── zstream.h │ │ │ │ │ └── zstream_test.cpp │ │ │ │ ├── iostream3 │ │ │ │ │ ├── README │ │ │ │ │ ├── TODO │ │ │ │ │ ├── test.cc │ │ │ │ │ ├── zfstream.cc │ │ │ │ │ └── zfstream.h │ │ │ │ ├── minizip │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── Makefile.am │ │ │ │ │ ├── MiniZip64_Changes.txt │ │ │ │ │ ├── MiniZip64_info.txt │ │ │ │ │ ├── configure.ac │ │ │ │ │ ├── crypt.h │ │ │ │ │ ├── ioapi.c │ │ │ │ │ ├── ioapi.h │ │ │ │ │ ├── iowin32.c │ │ │ │ │ ├── iowin32.h │ │ │ │ │ ├── make_vms.com │ │ │ │ │ ├── miniunz.c │ │ │ │ │ ├── miniunzip.1 │ │ │ │ │ ├── minizip.1 │ │ │ │ │ ├── minizip.c │ │ │ │ │ ├── minizip.pc.in │ │ │ │ │ ├── mztools.c │ │ │ │ │ ├── mztools.h │ │ │ │ │ ├── unzip.c │ │ │ │ │ ├── unzip.h │ │ │ │ │ ├── zip.c │ │ │ │ │ └── zip.h │ │ │ │ ├── nuget │ │ │ │ │ ├── nuget.csproj │ │ │ │ │ └── nuget.sln │ │ │ │ ├── pascal │ │ │ │ │ ├── example.pas │ │ │ │ │ ├── readme.txt │ │ │ │ │ ├── zlibd32.mak │ │ │ │ │ └── zlibpas.pas │ │ │ │ ├── puff │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README │ │ │ │ │ ├── puff.c │ │ │ │ │ ├── puff.h │ │ │ │ │ ├── pufftest.c │ │ │ │ │ └── zeros.raw │ │ │ │ ├── testzlib │ │ │ │ │ ├── testzlib.c │ │ │ │ │ └── testzlib.txt │ │ │ │ ├── untgz │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── Makefile.msc │ │ │ │ │ └── untgz.c │ │ │ │ └── vstudio │ │ │ │ │ ├── readme.txt │ │ │ │ │ ├── vc10 │ │ │ │ │ ├── miniunz.vcxproj │ │ │ │ │ ├── miniunz.vcxproj.filters │ │ │ │ │ ├── minizip.vcxproj │ │ │ │ │ ├── minizip.vcxproj.filters │ │ │ │ │ ├── testzlib.vcxproj │ │ │ │ │ ├── testzlib.vcxproj.filters │ │ │ │ │ ├── testzlibdll.vcxproj │ │ │ │ │ ├── testzlibdll.vcxproj.filters │ │ │ │ │ ├── zlib.rc │ │ │ │ │ ├── zlibstat.vcxproj │ │ │ │ │ ├── zlibstat.vcxproj.filters │ │ │ │ │ ├── zlibvc.def │ │ │ │ │ ├── zlibvc.sln │ │ │ │ │ ├── zlibvc.vcxproj │ │ │ │ │ └── zlibvc.vcxproj.filters │ │ │ │ │ ├── vc11 │ │ │ │ │ ├── miniunz.vcxproj │ │ │ │ │ ├── minizip.vcxproj │ │ │ │ │ ├── testzlib.vcxproj │ │ │ │ │ ├── testzlibdll.vcxproj │ │ │ │ │ ├── zlib.rc │ │ │ │ │ ├── zlibstat.vcxproj │ │ │ │ │ ├── zlibvc.def │ │ │ │ │ ├── zlibvc.sln │ │ │ │ │ └── zlibvc.vcxproj │ │ │ │ │ ├── vc12 │ │ │ │ │ ├── miniunz.vcxproj │ │ │ │ │ ├── minizip.vcxproj │ │ │ │ │ ├── testzlib.vcxproj │ │ │ │ │ ├── testzlibdll.vcxproj │ │ │ │ │ ├── zlib.rc │ │ │ │ │ ├── zlibstat.vcxproj │ │ │ │ │ ├── zlibvc.def │ │ │ │ │ ├── zlibvc.sln │ │ │ │ │ └── zlibvc.vcxproj │ │ │ │ │ ├── vc14 │ │ │ │ │ ├── miniunz.vcxproj │ │ │ │ │ ├── minizip.vcxproj │ │ │ │ │ ├── testzlib.vcxproj │ │ │ │ │ ├── testzlibdll.vcxproj │ │ │ │ │ ├── zlib.rc │ │ │ │ │ ├── zlibstat.vcxproj │ │ │ │ │ ├── zlibvc.def │ │ │ │ │ ├── zlibvc.sln │ │ │ │ │ └── zlibvc.vcxproj │ │ │ │ │ ├── vc17 │ │ │ │ │ ├── miniunz.vcxproj │ │ │ │ │ ├── minizip.vcxproj │ │ │ │ │ ├── testzlib.vcxproj │ │ │ │ │ ├── testzlibdll.vcxproj │ │ │ │ │ ├── zlib.rc │ │ │ │ │ ├── zlibstat.vcxproj │ │ │ │ │ ├── zlibvc.def │ │ │ │ │ ├── zlibvc.sln │ │ │ │ │ └── zlibvc.vcxproj │ │ │ │ │ └── vc9 │ │ │ │ │ ├── miniunz.vcproj │ │ │ │ │ ├── minizip.vcproj │ │ │ │ │ ├── testzlib.vcproj │ │ │ │ │ ├── testzlibdll.vcproj │ │ │ │ │ ├── zlib.rc │ │ │ │ │ ├── zlibstat.vcproj │ │ │ │ │ ├── zlibvc.def │ │ │ │ │ ├── zlibvc.sln │ │ │ │ │ └── zlibvc.vcproj │ │ │ ├── crc32.c │ │ │ ├── crc32.h │ │ │ ├── deflate.c │ │ │ ├── deflate.h │ │ │ ├── doc │ │ │ │ ├── algorithm.txt │ │ │ │ ├── crc-doc.1.0.pdf │ │ │ │ ├── rfc1950.txt │ │ │ │ ├── rfc1951.txt │ │ │ │ ├── rfc1952.txt │ │ │ │ └── txtvsbin.txt │ │ │ ├── examples │ │ │ │ ├── README.examples │ │ │ │ ├── enough.c │ │ │ │ ├── fitblk.c │ │ │ │ ├── gun.c │ │ │ │ ├── gzappend.c │ │ │ │ ├── gzjoin.c │ │ │ │ ├── gzlog.c │ │ │ │ ├── gzlog.h │ │ │ │ ├── gznorm.c │ │ │ │ ├── zlib_how.html │ │ │ │ ├── zpipe.c │ │ │ │ ├── zran.c │ │ │ │ └── zran.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 │ │ │ ├── make_vms.com │ │ │ ├── msdos │ │ │ │ ├── Makefile.bor │ │ │ │ ├── Makefile.dj2 │ │ │ │ ├── Makefile.emx │ │ │ │ ├── Makefile.msc │ │ │ │ └── Makefile.tc │ │ │ ├── nintendods │ │ │ │ ├── Makefile │ │ │ │ └── README │ │ │ ├── old │ │ │ │ ├── Makefile.emx │ │ │ │ ├── Makefile.riscos │ │ │ │ ├── README │ │ │ │ ├── descrip.mms │ │ │ │ ├── os2 │ │ │ │ │ ├── Makefile.os2 │ │ │ │ │ └── zlib.def │ │ │ │ └── visual-basic.txt │ │ │ ├── os400 │ │ │ │ ├── README400 │ │ │ │ ├── bndsrc │ │ │ │ ├── make.sh │ │ │ │ └── zlib.inc │ │ │ ├── qnx │ │ │ │ └── package.qpg │ │ │ ├── test │ │ │ │ ├── example.c │ │ │ │ ├── infcover.c │ │ │ │ └── minigzip.c │ │ │ ├── treebuild.xml │ │ │ ├── trees.c │ │ │ ├── trees.h │ │ │ ├── uncompr.c │ │ │ ├── watcom │ │ │ │ ├── watcom_f.mak │ │ │ │ └── watcom_l.mak │ │ │ ├── win32 │ │ │ │ ├── DLL_FAQ.txt │ │ │ │ ├── Makefile.bor │ │ │ │ ├── Makefile.gcc │ │ │ │ ├── Makefile.msc │ │ │ │ ├── README-WIN32.txt │ │ │ │ ├── VisualC.txt │ │ │ │ ├── zlib.def │ │ │ │ └── zlib1.rc │ │ │ ├── zconf.h │ │ │ ├── zconf.h.cmakein │ │ │ ├── zconf.h.in │ │ │ ├── zlib.3 │ │ │ ├── zlib.3.pdf │ │ │ ├── zlib.h │ │ │ ├── zlib.map │ │ │ ├── zlib.pc.cmakein │ │ │ ├── zlib.pc.in │ │ │ ├── zutil.c │ │ │ └── zutil.h │ │ └── zstd-1.5.6 │ │ │ ├── .buckconfig │ │ │ ├── .buckversion │ │ │ ├── .circleci │ │ │ ├── config.yml │ │ │ └── images │ │ │ │ └── primary │ │ │ │ └── Dockerfile │ │ │ ├── .cirrus.yml │ │ │ ├── .gitattributes │ │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ ├── bug_report.md │ │ │ │ └── feature_request.md │ │ │ ├── dependabot.yml │ │ │ └── workflows │ │ │ │ ├── commit.yml │ │ │ │ ├── dev-long-tests.yml │ │ │ │ ├── dev-short-tests.yml │ │ │ │ ├── nightly.yml │ │ │ │ ├── publish-release-artifacts.yml │ │ │ │ ├── scorecards.yml │ │ │ │ └── windows-artifacts.yml │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── COPYING │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── Package.swift │ │ │ ├── README.md │ │ │ ├── SECURITY.md │ │ │ ├── TESTING.md │ │ │ ├── contrib │ │ │ ├── VS2005 │ │ │ │ ├── README.md │ │ │ │ ├── fullbench │ │ │ │ │ └── fullbench.vcproj │ │ │ │ ├── fuzzer │ │ │ │ │ └── fuzzer.vcproj │ │ │ │ ├── zstd.sln │ │ │ │ ├── zstd │ │ │ │ │ └── zstd.vcproj │ │ │ │ └── zstdlib │ │ │ │ │ └── zstdlib.vcproj │ │ │ ├── cleanTabs │ │ │ ├── diagnose_corruption │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ └── check_flipped_bits.c │ │ │ ├── docker │ │ │ │ ├── Dockerfile │ │ │ │ └── README.md │ │ │ ├── externalSequenceProducer │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── main.c │ │ │ │ ├── sequence_producer.c │ │ │ │ └── sequence_producer.h │ │ │ ├── freestanding_lib │ │ │ │ └── freestanding.py │ │ │ ├── gen_html │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── gen-zstd-manual.sh │ │ │ │ └── gen_html.cpp │ │ │ ├── largeNbDicts │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ └── largeNbDicts.c │ │ │ ├── linux-kernel │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── btrfs-benchmark.sh │ │ │ │ ├── btrfs-extract-benchmark.sh │ │ │ │ ├── decompress_sources.h │ │ │ │ ├── linux.mk │ │ │ │ ├── linux_zstd.h │ │ │ │ ├── mem.h │ │ │ │ ├── squashfs-benchmark.sh │ │ │ │ ├── test │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── include │ │ │ │ │ │ ├── asm │ │ │ │ │ │ │ └── unaligned.h │ │ │ │ │ │ └── linux │ │ │ │ │ │ │ ├── compiler.h │ │ │ │ │ │ │ ├── errno.h │ │ │ │ │ │ │ ├── kernel.h │ │ │ │ │ │ │ ├── limits.h │ │ │ │ │ │ │ ├── math64.h │ │ │ │ │ │ │ ├── module.h │ │ │ │ │ │ │ ├── printk.h │ │ │ │ │ │ │ ├── stddef.h │ │ │ │ │ │ │ ├── swab.h │ │ │ │ │ │ │ ├── types.h │ │ │ │ │ │ │ └── xxhash.h │ │ │ │ │ ├── macro-test.sh │ │ │ │ │ ├── static_test.c │ │ │ │ │ └── test.c │ │ │ │ ├── zstd_common_module.c │ │ │ │ ├── zstd_compress_module.c │ │ │ │ ├── zstd_decompress_module.c │ │ │ │ └── zstd_deps.h │ │ │ ├── match_finders │ │ │ │ ├── README.md │ │ │ │ ├── zstd_edist.c │ │ │ │ └── zstd_edist.h │ │ │ ├── premake │ │ │ │ ├── premake4.lua │ │ │ │ └── zstd.lua │ │ │ ├── pzstd │ │ │ │ ├── .gitignore │ │ │ │ ├── BUCK │ │ │ │ ├── ErrorHolder.h │ │ │ │ ├── Logging.h │ │ │ │ ├── Makefile │ │ │ │ ├── Options.cpp │ │ │ │ ├── Options.h │ │ │ │ ├── Pzstd.cpp │ │ │ │ ├── Pzstd.h │ │ │ │ ├── README.md │ │ │ │ ├── SkippableFrame.cpp │ │ │ │ ├── SkippableFrame.h │ │ │ │ ├── images │ │ │ │ │ ├── Cspeed.png │ │ │ │ │ └── Dspeed.png │ │ │ │ ├── main.cpp │ │ │ │ ├── test │ │ │ │ │ ├── BUCK │ │ │ │ │ ├── OptionsTest.cpp │ │ │ │ │ ├── PzstdTest.cpp │ │ │ │ │ ├── RoundTrip.h │ │ │ │ │ └── RoundTripTest.cpp │ │ │ │ └── utils │ │ │ │ │ ├── BUCK │ │ │ │ │ ├── Buffer.h │ │ │ │ │ ├── FileSystem.h │ │ │ │ │ ├── Likely.h │ │ │ │ │ ├── Portability.h │ │ │ │ │ ├── Range.h │ │ │ │ │ ├── ResourcePool.h │ │ │ │ │ ├── ScopeGuard.h │ │ │ │ │ ├── ThreadPool.h │ │ │ │ │ ├── WorkQueue.h │ │ │ │ │ └── test │ │ │ │ │ ├── BUCK │ │ │ │ │ ├── BufferTest.cpp │ │ │ │ │ ├── RangeTest.cpp │ │ │ │ │ ├── ResourcePoolTest.cpp │ │ │ │ │ ├── ScopeGuardTest.cpp │ │ │ │ │ ├── ThreadPoolTest.cpp │ │ │ │ │ └── WorkQueueTest.cpp │ │ │ ├── recovery │ │ │ │ ├── Makefile │ │ │ │ └── recover_directory.c │ │ │ ├── seekable_format │ │ │ │ ├── README.md │ │ │ │ ├── examples │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── parallel_compression.c │ │ │ │ │ ├── parallel_processing.c │ │ │ │ │ ├── seekable_compression.c │ │ │ │ │ ├── seekable_decompression.c │ │ │ │ │ └── seekable_decompression_mem.c │ │ │ │ ├── tests │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── Makefile │ │ │ │ │ └── seekable_tests.c │ │ │ │ ├── zstd_seekable.h │ │ │ │ ├── zstd_seekable_compression_format.md │ │ │ │ ├── zstdseek_compress.c │ │ │ │ └── zstdseek_decompress.c │ │ │ ├── seqBench │ │ │ │ ├── Makefile │ │ │ │ └── seqBench.c │ │ │ └── snap │ │ │ │ └── snapcraft.yaml │ │ │ ├── doc │ │ │ ├── README.md │ │ │ ├── decompressor_errata.md │ │ │ ├── decompressor_permissive.md │ │ │ ├── educational_decoder │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── harness.c │ │ │ │ ├── zstd_decompress.c │ │ │ │ └── zstd_decompress.h │ │ │ ├── images │ │ │ │ ├── CSpeed2.png │ │ │ │ ├── DCspeed5.png │ │ │ │ ├── DSpeed3.png │ │ │ │ ├── cdict_v136.png │ │ │ │ ├── dict-cr.png │ │ │ │ ├── dict-cs.png │ │ │ │ ├── dict-ds.png │ │ │ │ ├── zstd_cdict_v1_3_5.png │ │ │ │ └── zstd_logo86.png │ │ │ ├── zstd_compression_format.md │ │ │ └── zstd_manual.html │ │ │ ├── examples │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── common.h │ │ │ ├── dictionary_compression.c │ │ │ ├── dictionary_decompression.c │ │ │ ├── multiple_simple_compression.c │ │ │ ├── multiple_streaming_compression.c │ │ │ ├── simple_compression.c │ │ │ ├── simple_decompression.c │ │ │ ├── streaming_compression.c │ │ │ ├── streaming_compression_thread_pool.c │ │ │ ├── streaming_decompression.c │ │ │ └── streaming_memory_usage.c │ │ │ ├── lib │ │ │ ├── .gitignore │ │ │ ├── BUCK │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── common │ │ │ │ ├── allocations.h │ │ │ │ ├── bits.h │ │ │ │ ├── bitstream.h │ │ │ │ ├── compiler.h │ │ │ │ ├── cpu.h │ │ │ │ ├── debug.c │ │ │ │ ├── debug.h │ │ │ │ ├── entropy_common.c │ │ │ │ ├── error_private.c │ │ │ │ ├── error_private.h │ │ │ │ ├── fse.h │ │ │ │ ├── fse_decompress.c │ │ │ │ ├── huf.h │ │ │ │ ├── mem.h │ │ │ │ ├── pool.c │ │ │ │ ├── pool.h │ │ │ │ ├── portability_macros.h │ │ │ │ ├── threading.c │ │ │ │ ├── threading.h │ │ │ │ ├── xxhash.c │ │ │ │ ├── xxhash.h │ │ │ │ ├── zstd_common.c │ │ │ │ ├── zstd_deps.h │ │ │ │ ├── zstd_internal.h │ │ │ │ └── zstd_trace.h │ │ │ ├── compress │ │ │ │ ├── clevels.h │ │ │ │ ├── fse_compress.c │ │ │ │ ├── hist.c │ │ │ │ ├── hist.h │ │ │ │ ├── huf_compress.c │ │ │ │ ├── zstd_compress.c │ │ │ │ ├── zstd_compress_internal.h │ │ │ │ ├── zstd_compress_literals.c │ │ │ │ ├── zstd_compress_literals.h │ │ │ │ ├── zstd_compress_sequences.c │ │ │ │ ├── zstd_compress_sequences.h │ │ │ │ ├── zstd_compress_superblock.c │ │ │ │ ├── zstd_compress_superblock.h │ │ │ │ ├── zstd_cwksp.h │ │ │ │ ├── zstd_double_fast.c │ │ │ │ ├── zstd_double_fast.h │ │ │ │ ├── zstd_fast.c │ │ │ │ ├── zstd_fast.h │ │ │ │ ├── zstd_lazy.c │ │ │ │ ├── zstd_lazy.h │ │ │ │ ├── zstd_ldm.c │ │ │ │ ├── zstd_ldm.h │ │ │ │ ├── zstd_ldm_geartab.h │ │ │ │ ├── zstd_opt.c │ │ │ │ ├── zstd_opt.h │ │ │ │ ├── zstdmt_compress.c │ │ │ │ └── zstdmt_compress.h │ │ │ ├── decompress │ │ │ │ ├── huf_decompress.c │ │ │ │ ├── huf_decompress_amd64.S │ │ │ │ ├── zstd_ddict.c │ │ │ │ ├── zstd_ddict.h │ │ │ │ ├── zstd_decompress.c │ │ │ │ ├── zstd_decompress_block.c │ │ │ │ ├── zstd_decompress_block.h │ │ │ │ └── zstd_decompress_internal.h │ │ │ ├── deprecated │ │ │ │ ├── zbuff.h │ │ │ │ ├── zbuff_common.c │ │ │ │ ├── zbuff_compress.c │ │ │ │ └── zbuff_decompress.c │ │ │ ├── dictBuilder │ │ │ │ ├── cover.c │ │ │ │ ├── cover.h │ │ │ │ ├── divsufsort.c │ │ │ │ ├── divsufsort.h │ │ │ │ ├── fastcover.c │ │ │ │ └── zdict.c │ │ │ ├── dll │ │ │ │ └── example │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── build_package.bat │ │ │ │ │ ├── fullbench-dll.sln │ │ │ │ │ └── fullbench-dll.vcxproj │ │ │ ├── legacy │ │ │ │ ├── zstd_legacy.h │ │ │ │ ├── zstd_v01.c │ │ │ │ ├── zstd_v01.h │ │ │ │ ├── zstd_v02.c │ │ │ │ ├── zstd_v02.h │ │ │ │ ├── zstd_v03.c │ │ │ │ ├── zstd_v03.h │ │ │ │ ├── zstd_v04.c │ │ │ │ ├── zstd_v04.h │ │ │ │ ├── zstd_v05.c │ │ │ │ ├── zstd_v05.h │ │ │ │ ├── zstd_v06.c │ │ │ │ ├── zstd_v06.h │ │ │ │ ├── zstd_v07.c │ │ │ │ └── zstd_v07.h │ │ │ ├── libzstd.mk │ │ │ ├── libzstd.pc.in │ │ │ ├── module.modulemap │ │ │ ├── zdict.h │ │ │ ├── zstd.h │ │ │ └── zstd_errors.h │ │ │ ├── programs │ │ │ ├── .gitignore │ │ │ ├── BUCK │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── benchfn.c │ │ │ ├── benchfn.h │ │ │ ├── benchzstd.c │ │ │ ├── benchzstd.h │ │ │ ├── datagen.c │ │ │ ├── datagen.h │ │ │ ├── dibio.c │ │ │ ├── dibio.h │ │ │ ├── fileio.c │ │ │ ├── fileio.h │ │ │ ├── fileio_asyncio.c │ │ │ ├── fileio_asyncio.h │ │ │ ├── fileio_common.h │ │ │ ├── fileio_types.h │ │ │ ├── lorem.c │ │ │ ├── lorem.h │ │ │ ├── platform.h │ │ │ ├── timefn.c │ │ │ ├── timefn.h │ │ │ ├── util.c │ │ │ ├── util.h │ │ │ ├── windres │ │ │ │ ├── verrsrc.h │ │ │ │ ├── zstd.rc │ │ │ │ ├── zstd32.res │ │ │ │ └── zstd64.res │ │ │ ├── zstd.1 │ │ │ ├── zstd.1.md │ │ │ ├── zstdcli.c │ │ │ ├── zstdcli_trace.c │ │ │ ├── zstdcli_trace.h │ │ │ ├── zstdgrep │ │ │ ├── zstdgrep.1 │ │ │ ├── zstdgrep.1.md │ │ │ ├── zstdless │ │ │ ├── zstdless.1 │ │ │ └── zstdless.1.md │ │ │ ├── tests │ │ │ ├── .gitignore │ │ │ ├── DEPRECATED-test-zstd-speed.py │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── automated_benchmarking.py │ │ │ ├── bigdict.c │ │ │ ├── checkTag.c │ │ │ ├── check_size.py │ │ │ ├── cli-tests │ │ │ │ ├── .gitignore │ │ │ │ ├── README.md │ │ │ │ ├── basic │ │ │ │ │ ├── args.sh │ │ │ │ │ ├── args.sh.exit │ │ │ │ │ ├── args.sh.stderr.glob │ │ │ │ │ ├── help.sh │ │ │ │ │ ├── help.sh.stdout.glob │ │ │ │ │ ├── memlimit.sh │ │ │ │ │ ├── memlimit.sh.stderr.exact │ │ │ │ │ ├── memlimit.sh.stdout.exact │ │ │ │ │ ├── output_dir.sh │ │ │ │ │ ├── output_dir.sh.stderr.exact │ │ │ │ │ ├── output_dir.sh.stdout.exact │ │ │ │ │ ├── version.sh │ │ │ │ │ └── version.sh.stdout.glob │ │ │ │ ├── bin │ │ │ │ │ ├── cmp_size │ │ │ │ │ ├── datagen │ │ │ │ │ ├── die │ │ │ │ │ ├── println │ │ │ │ │ ├── unzstd │ │ │ │ │ ├── zstd │ │ │ │ │ ├── zstdcat │ │ │ │ │ ├── zstdgrep │ │ │ │ │ └── zstdless │ │ │ │ ├── cltools │ │ │ │ │ ├── setup │ │ │ │ │ ├── zstdgrep.sh │ │ │ │ │ ├── zstdgrep.sh.exit │ │ │ │ │ ├── zstdgrep.sh.stderr.exact │ │ │ │ │ ├── zstdgrep.sh.stdout.glob │ │ │ │ │ ├── zstdless.sh │ │ │ │ │ ├── zstdless.sh.stderr.exact │ │ │ │ │ └── zstdless.sh.stdout.glob │ │ │ │ ├── common │ │ │ │ │ ├── format.sh │ │ │ │ │ ├── mtime.sh │ │ │ │ │ ├── permissions.sh │ │ │ │ │ └── platform.sh │ │ │ │ ├── compression │ │ │ │ │ ├── adapt.sh │ │ │ │ │ ├── basic.sh │ │ │ │ │ ├── compress-literals.sh │ │ │ │ │ ├── format.sh │ │ │ │ │ ├── golden.sh │ │ │ │ │ ├── gzip-compat.sh │ │ │ │ │ ├── levels.sh │ │ │ │ │ ├── levels.sh.stderr.exact │ │ │ │ │ ├── long-distance-matcher.sh │ │ │ │ │ ├── multi-threaded.sh │ │ │ │ │ ├── multi-threaded.sh.stderr.exact │ │ │ │ │ ├── multiple-files.sh │ │ │ │ │ ├── multiple-files.sh.stdout.exact │ │ │ │ │ ├── row-match-finder.sh │ │ │ │ │ ├── setup │ │ │ │ │ ├── stream-size.sh │ │ │ │ │ ├── verbose-wlog.sh │ │ │ │ │ ├── verbose-wlog.sh.stderr.glob │ │ │ │ │ ├── verbose-wlog.sh.stdout.glob │ │ │ │ │ ├── window-resize.sh │ │ │ │ │ ├── window-resize.sh.stderr.ignore │ │ │ │ │ └── window-resize.sh.stdout.glob │ │ │ │ ├── decompression │ │ │ │ │ ├── detectErrors.sh │ │ │ │ │ ├── golden.sh │ │ │ │ │ ├── pass-through.sh │ │ │ │ │ ├── pass-through.sh.stderr.exact │ │ │ │ │ └── pass-through.sh.stdout.exact │ │ │ │ ├── dict-builder │ │ │ │ │ ├── empty-input.sh │ │ │ │ │ ├── empty-input.sh.stderr.exact │ │ │ │ │ ├── no-inputs.sh │ │ │ │ │ ├── no-inputs.sh.exit │ │ │ │ │ └── no-inputs.sh.stderr.exact │ │ │ │ ├── dictionaries │ │ │ │ │ ├── dictionary-mismatch.sh │ │ │ │ │ ├── dictionary-mismatch.sh.stderr.exact │ │ │ │ │ ├── golden.sh │ │ │ │ │ ├── setup │ │ │ │ │ └── setup_once │ │ │ │ ├── file-handling │ │ │ │ │ ├── directory-mirror.sh │ │ │ │ │ ├── directory-mirror.sh.stderr.exact │ │ │ │ │ └── directory-mirror.sh.stdout.exact │ │ │ │ ├── file-stat │ │ │ │ │ ├── compress-file-to-dir-without-write-perm.sh │ │ │ │ │ ├── compress-file-to-dir-without-write-perm.sh.stderr.exact │ │ │ │ │ ├── compress-file-to-file.sh │ │ │ │ │ ├── compress-file-to-file.sh.stderr.exact │ │ │ │ │ ├── compress-file-to-stdout.sh │ │ │ │ │ ├── compress-file-to-stdout.sh.stderr.exact │ │ │ │ │ ├── compress-stdin-to-file.sh │ │ │ │ │ ├── compress-stdin-to-file.sh.stderr.exact │ │ │ │ │ ├── compress-stdin-to-stdout.sh │ │ │ │ │ ├── compress-stdin-to-stdout.sh.stderr.exact │ │ │ │ │ ├── decompress-file-to-file.sh │ │ │ │ │ ├── decompress-file-to-file.sh.stderr.exact │ │ │ │ │ ├── decompress-file-to-stdout.sh │ │ │ │ │ ├── decompress-file-to-stdout.sh.stderr.exact │ │ │ │ │ ├── decompress-stdin-to-file.sh │ │ │ │ │ ├── decompress-stdin-to-file.sh.stderr.exact │ │ │ │ │ ├── decompress-stdin-to-stdout.sh │ │ │ │ │ └── decompress-stdin-to-stdout.sh.stderr.exact │ │ │ │ ├── progress │ │ │ │ │ ├── no-progress.sh │ │ │ │ │ ├── no-progress.sh.stderr.glob │ │ │ │ │ ├── progress.sh │ │ │ │ │ └── progress.sh.stderr.glob │ │ │ │ ├── run.py │ │ │ │ └── zstd-symlinks │ │ │ │ │ ├── setup │ │ │ │ │ ├── zstdcat.sh │ │ │ │ │ └── zstdcat.sh.stdout.exact │ │ │ ├── datagencli.c │ │ │ ├── decodecorpus.c │ │ │ ├── dict-files │ │ │ │ └── zero-weight-dict │ │ │ ├── external_matchfinder.c │ │ │ ├── external_matchfinder.h │ │ │ ├── fullbench.c │ │ │ ├── fuzz │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── block_decompress.c │ │ │ │ ├── block_round_trip.c │ │ │ │ ├── decompress_cross_format.c │ │ │ │ ├── decompress_dstSize_tooSmall.c │ │ │ │ ├── dictionary_decompress.c │ │ │ │ ├── dictionary_loader.c │ │ │ │ ├── dictionary_round_trip.c │ │ │ │ ├── dictionary_stream_round_trip.c │ │ │ │ ├── fse_read_ncount.c │ │ │ │ ├── fuzz.h │ │ │ │ ├── fuzz.py │ │ │ │ ├── fuzz_data_producer.c │ │ │ │ ├── fuzz_data_producer.h │ │ │ │ ├── fuzz_helpers.c │ │ │ │ ├── fuzz_helpers.h │ │ │ │ ├── fuzz_third_party_seq_prod.h │ │ │ │ ├── generate_sequences.c │ │ │ │ ├── huf_decompress.c │ │ │ │ ├── huf_round_trip.c │ │ │ │ ├── raw_dictionary_round_trip.c │ │ │ │ ├── regression_driver.c │ │ │ │ ├── seekable_roundtrip.c │ │ │ │ ├── seq_prod_fuzz_example │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ └── example_seq_prod.c │ │ │ │ ├── sequence_compression_api.c │ │ │ │ ├── simple_compress.c │ │ │ │ ├── simple_decompress.c │ │ │ │ ├── simple_round_trip.c │ │ │ │ ├── stream_decompress.c │ │ │ │ ├── stream_round_trip.c │ │ │ │ ├── zstd_frame_info.c │ │ │ │ ├── zstd_helpers.c │ │ │ │ └── zstd_helpers.h │ │ │ ├── fuzzer.c │ │ │ ├── golden-compression │ │ │ │ ├── PR-3517-block-splitter-corruption-test │ │ │ │ ├── http │ │ │ │ ├── huffman-compressed-larger │ │ │ │ └── large-literal-and-match-lengths │ │ │ ├── golden-decompression-errors │ │ │ │ ├── .gitignore │ │ │ │ ├── off0.bin.zst │ │ │ │ └── zeroSeq_extraneous.zst │ │ │ ├── golden-decompression │ │ │ │ ├── block-128k.zst │ │ │ │ ├── empty-block.zst │ │ │ │ ├── rle-first-block.zst │ │ │ │ └── zeroSeq_2B.zst │ │ │ ├── golden-dictionaries │ │ │ │ └── http-dict-missing-symbols │ │ │ ├── gzip │ │ │ │ ├── Makefile │ │ │ │ ├── gzip-env.sh │ │ │ │ ├── helin-segv.sh │ │ │ │ ├── help-version.sh │ │ │ │ ├── hufts-segv.gz │ │ │ │ ├── hufts.sh │ │ │ │ ├── init.cfg │ │ │ │ ├── init.sh │ │ │ │ ├── keep.sh │ │ │ │ ├── list.sh │ │ │ │ ├── memcpy-abuse.sh │ │ │ │ ├── mixed.sh │ │ │ │ ├── null-suffix-clobber.sh │ │ │ │ ├── stdin.sh │ │ │ │ ├── test-driver.sh │ │ │ │ ├── trailing-nul.sh │ │ │ │ ├── unpack-invalid.sh │ │ │ │ ├── z-suffix.sh │ │ │ │ ├── zdiff.sh │ │ │ │ ├── zgrep-context.sh │ │ │ │ ├── zgrep-f.sh │ │ │ │ ├── zgrep-signal.sh │ │ │ │ └── znew-k.sh │ │ │ ├── invalidDictionaries.c │ │ │ ├── legacy.c │ │ │ ├── libzstd_builds.sh │ │ │ ├── longmatch.c │ │ │ ├── loremOut.c │ │ │ ├── loremOut.h │ │ │ ├── paramgrill.c │ │ │ ├── playTests.sh │ │ │ ├── poolTests.c │ │ │ ├── rateLimiter.py │ │ │ ├── regression │ │ │ │ ├── .gitignore │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── config.c │ │ │ │ ├── config.h │ │ │ │ ├── data.c │ │ │ │ ├── data.h │ │ │ │ ├── levels.h │ │ │ │ ├── method.c │ │ │ │ ├── method.h │ │ │ │ ├── result.c │ │ │ │ ├── result.h │ │ │ │ ├── results.csv │ │ │ │ └── test.c │ │ │ ├── roundTripCrash.c │ │ │ ├── seqgen.c │ │ │ ├── seqgen.h │ │ │ ├── test-license.py │ │ │ ├── test-variants.sh │ │ │ ├── test-zstd-versions.py │ │ │ └── zstreamtest.c │ │ │ └── zlibWrapper │ │ │ ├── .gitignore │ │ │ ├── BUCK │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── examples │ │ │ ├── example.c │ │ │ ├── example_original.c │ │ │ ├── fitblk.c │ │ │ ├── fitblk_original.c │ │ │ ├── minigzip.c │ │ │ └── zwrapbench.c │ │ │ ├── gzclose.c │ │ │ ├── gzcompatibility.h │ │ │ ├── gzguts.h │ │ │ ├── gzlib.c │ │ │ ├── gzread.c │ │ │ ├── gzwrite.c │ │ │ ├── zstd_zlibwrapper.c │ │ │ └── zstd_zlibwrapper.h │ ├── include │ │ ├── dr_libs │ │ │ └── dr_flac.h │ │ └── libchdr │ │ │ ├── bitstream.h │ │ │ ├── cdrom.h │ │ │ ├── chd.h │ │ │ ├── chdconfig.h │ │ │ ├── coretypes.h │ │ │ ├── flac.h │ │ │ └── huffman.h │ └── src │ │ ├── libchdr_bitstream.c │ │ ├── libchdr_cdrom.c │ │ ├── libchdr_chd.c │ │ ├── libchdr_flac.c │ │ └── libchdr_huffman.c ├── libogg │ ├── COPYING │ ├── README.md │ ├── include │ │ └── ogg │ │ │ ├── ogg.h │ │ │ └── os_types.h │ └── src │ │ ├── bitwise.c │ │ ├── crctable.h │ │ └── framing.c ├── libretro-common │ ├── cdrom │ │ └── cdrom.c │ ├── compat │ │ ├── compat_fnmatch.c │ │ ├── compat_getopt.c │ │ ├── compat_ifaddrs.c │ │ ├── compat_posix_string.c │ │ ├── compat_snprintf.c │ │ ├── compat_strcasestr.c │ │ ├── compat_strl.c │ │ ├── compat_vscprintf.c │ │ └── fopen_utf8.c │ ├── crt │ │ ├── include │ │ │ └── string.h │ │ └── string.c │ ├── encodings │ │ ├── encoding_base64.c │ │ ├── encoding_crc32.c │ │ └── encoding_utf.c │ ├── file │ │ ├── file_path.c │ │ ├── file_path_io.c │ │ └── retro_dirent.c │ ├── include │ │ ├── boolean.h │ │ ├── cdrom │ │ │ └── cdrom.h │ │ ├── clamping.h │ │ ├── compat │ │ │ ├── apple_compat.h │ │ │ ├── fnmatch.h │ │ │ ├── fopen_utf8.h │ │ │ ├── getopt.h │ │ │ ├── ifaddrs.h │ │ │ ├── intrinsics.h │ │ │ ├── msvc.h │ │ │ ├── msvc │ │ │ │ └── stdint.h │ │ │ ├── posix_string.h │ │ │ ├── strcasestr.h │ │ │ ├── strl.h │ │ │ ├── zconf.h │ │ │ ├── zconf.h.in │ │ │ ├── zlib.h │ │ │ ├── zlib │ │ │ │ ├── zconf.h │ │ │ │ ├── zconf.h.in │ │ │ │ ├── zlib.h │ │ │ │ └── zutil.h │ │ │ └── zutil.h │ │ ├── encodings │ │ │ ├── base64.h │ │ │ ├── crc32.h │ │ │ ├── utf.h │ │ │ └── win32.h │ │ ├── file │ │ │ ├── file_path.h │ │ │ └── nbio.h │ │ ├── filters.h │ │ ├── libretro.h │ │ ├── lists │ │ │ ├── dir_list.h │ │ │ ├── file_list.h │ │ │ └── string_list.h │ │ ├── memalign.h │ │ ├── memmap.h │ │ ├── retro_assert.h │ │ ├── retro_common.h │ │ ├── retro_common_api.h │ │ ├── retro_dirent.h │ │ ├── retro_endianness.h │ │ ├── retro_environment.h │ │ ├── retro_inline.h │ │ ├── retro_math.h │ │ ├── retro_miscellaneous.h │ │ ├── retro_stat.h │ │ ├── retro_timers.h │ │ ├── streams │ │ │ ├── chd_stream.h │ │ │ ├── file_stream.h │ │ │ ├── file_stream_transforms.h │ │ │ ├── interface_stream.h │ │ │ ├── memory_stream.h │ │ │ ├── rzip_stream.h │ │ │ ├── stdin_stream.h │ │ │ └── trans_stream.h │ │ ├── string │ │ │ └── stdstring.h │ │ ├── time │ │ │ └── rtime.h │ │ ├── utils │ │ │ └── md5.h │ │ └── vfs │ │ │ ├── vfs.h │ │ │ ├── vfs_implementation.h │ │ │ └── vfs_implementation_cdrom.h │ ├── lists │ │ ├── dir_list.c │ │ ├── file_list.c │ │ ├── string_list.c │ │ └── vector_list.c │ ├── memmap │ │ └── memalign.c │ ├── streams │ │ ├── chd_stream.c │ │ ├── file_stream.c │ │ ├── file_stream_transforms.c │ │ ├── interface_stream.c │ │ ├── memory_stream.c │ │ ├── rzip_stream.c │ │ ├── stdin_stream.c │ │ ├── trans_stream.c │ │ ├── trans_stream_pipe.c │ │ └── trans_stream_zlib.c │ ├── string │ │ └── stdstring.c │ ├── time │ │ └── rtime.c │ └── vfs │ │ ├── vfs_implementation.c │ │ ├── vfs_implementation_cdrom.c │ │ └── vfs_implementation_uwp.cpp ├── libvorbis │ ├── COPYING │ ├── README.md │ ├── include │ │ └── vorbis │ │ │ ├── codec.h │ │ │ ├── vorbisenc.h │ │ │ └── vorbisfile.h │ └── lib │ │ ├── backends.h │ │ ├── bitrate.c │ │ ├── bitrate.h │ │ ├── block.c │ │ ├── books │ │ ├── coupled │ │ │ ├── res_books_51.h │ │ │ └── res_books_stereo.h │ │ ├── floor │ │ │ └── floor_books.h │ │ └── uncoupled │ │ │ └── res_books_uncoupled.h │ │ ├── codebook.c │ │ ├── codebook.h │ │ ├── codec_internal.h │ │ ├── envelope.c │ │ ├── envelope.h │ │ ├── floor0.c │ │ ├── floor1.c │ │ ├── highlevel.h │ │ ├── info.c │ │ ├── lookup.c │ │ ├── lookup.h │ │ ├── lookup_data.h │ │ ├── lookups.pl │ │ ├── lpc.c │ │ ├── lpc.h │ │ ├── lsp.c │ │ ├── lsp.h │ │ ├── mapping0.c │ │ ├── masking.h │ │ ├── mdct.c │ │ ├── mdct.h │ │ ├── misc.h │ │ ├── modes │ │ ├── floor_all.h │ │ ├── psych_11.h │ │ ├── psych_16.h │ │ ├── psych_44.h │ │ ├── psych_8.h │ │ ├── residue_16.h │ │ ├── residue_44.h │ │ ├── residue_44p51.h │ │ ├── residue_44u.h │ │ ├── residue_8.h │ │ ├── setup_11.h │ │ ├── setup_16.h │ │ ├── setup_22.h │ │ ├── setup_32.h │ │ ├── setup_44.h │ │ ├── setup_44p51.h │ │ ├── setup_44u.h │ │ ├── setup_8.h │ │ └── setup_X.h │ │ ├── os.h │ │ ├── psy.c │ │ ├── psy.h │ │ ├── registry.c │ │ ├── registry.h │ │ ├── res0.c │ │ ├── scales.h │ │ ├── sharedbook.c │ │ ├── smallft.c │ │ ├── smallft.h │ │ ├── synthesis.c │ │ ├── vorbisfile.c │ │ ├── window.c │ │ └── window.h └── minizip │ ├── ioapi.c │ ├── ioapi.h │ ├── unzip.c │ └── unzip.h ├── jni ├── Android.mk └── Application.mk ├── link.T ├── retroarch └── libneocd_libretro.info └── src ├── 3rdparty ├── musashi │ ├── m68k.h │ ├── m68kconf.h │ ├── m68kcpu.c │ ├── m68kcpu.h │ ├── m68kfpu.c │ ├── m68kmmu.h │ ├── m68kops.c │ ├── m68kops.h │ └── softfloat │ │ ├── README.txt │ │ ├── mamesf.h │ │ ├── milieu.h │ │ ├── softfloat-macros │ │ ├── softfloat-specialize │ │ ├── softfloat.c │ │ └── softfloat.h ├── ym │ ├── ym2610.cpp │ └── ym2610.h └── z80 │ ├── z80.cpp │ ├── z80.h │ ├── z80daisy.cpp │ └── z80daisy.h ├── abstractfile.h ├── archive.cpp ├── archive.h ├── archivezip.cpp ├── archivezip.h ├── audio.cpp ├── audio.h ├── audiobuffer.h ├── bios.cpp ├── bios.h ├── cdrom.cpp ├── cdrom.h ├── cdromcontroller.cpp ├── cdromcontroller.h ├── cdromtoc.cpp ├── cdromtoc.h ├── chdfile.cpp ├── chdfile.h ├── circularbuffer.h ├── clamp.h ├── datapacker.cpp ├── datapacker.h ├── file.cpp ├── file.h ├── flacfile.cpp ├── flacfile.h ├── inline.h ├── input.cpp ├── input.h ├── lc8951.cpp ├── lc8951.h ├── libretro.cpp ├── libretro_backupram.cpp ├── libretro_backupram.h ├── libretro_bios.cpp ├── libretro_bios.h ├── libretro_common.cpp ├── libretro_common.h ├── libretro_input.cpp ├── libretro_input.h ├── libretro_log.cpp ├── libretro_log.h ├── libretro_memmap.cpp ├── libretro_memmap.h ├── libretro_variables.cpp ├── libretro_variables.h ├── m68kintf.cpp ├── m68kintf.h ├── memory.cpp ├── memory.h ├── memory_backupram.cpp ├── memory_backupram.h ├── memory_cdintf.cpp ├── memory_cdintf.h ├── memory_input.cpp ├── memory_input.h ├── memory_mapped.cpp ├── memory_mapped.h ├── memory_paletteram.cpp ├── memory_paletteram.h ├── memory_switches.cpp ├── memory_switches.h ├── memory_video.cpp ├── memory_video.h ├── memory_z80comm.cpp ├── memory_z80comm.h ├── misc.h ├── neocd_endian.h ├── neogeocd.cpp ├── neogeocd.h ├── oggfile.cpp ├── oggfile.h ├── packedstruct.h ├── path.cpp ├── path.h ├── round.h ├── stringlist.h ├── timeprofiler.cpp ├── timeprofiler.h ├── timer.cpp ├── timer.h ├── timergroup.cpp ├── timergroup.h ├── trackindex.h ├── video.cpp ├── video.h ├── wavfile.cpp ├── wavfile.h ├── wavstruct.h ├── z80intf.cpp └── z80intf.h /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | distclean 3 | .clang-format 4 | CMakeFiles/ 5 | CMakeCache.txt 6 | cmake_install.cmake 7 | .vscode 8 | *.o 9 | *.so 10 | *.dll 11 | -------------------------------------------------------------------------------- /deps/libchdr/README.md: -------------------------------------------------------------------------------- 1 | # libchdr 2 | 3 | libchdr is a standalone library for reading MAME's CHDv1-v5 formats. 4 | 5 | The code is based off of MAME's old C codebase which read up to CHDv4 with OS-dependent features removed, and CHDv5 support backported from MAME's current C++ codebase. 6 | 7 | libchdr is licensed under the BSD 3-Clause (see [LICENSE.txt](LICENSE.txt)) and uses third party libraries that are each distributed under their own terms (see each library's license in [deps/](deps/)). 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/lzma-24.05/LICENSE: -------------------------------------------------------------------------------- 1 | LZMA SDK is placed in the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original LZMA SDK code, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. -------------------------------------------------------------------------------- /deps/libchdr/deps/lzma-24.05/include/Delta.h: -------------------------------------------------------------------------------- 1 | /* Delta.h -- Delta converter 2 | 2023-03-03 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef ZIP7_INC_DELTA_H 5 | #define ZIP7_INC_DELTA_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | #define DELTA_STATE_SIZE 256 12 | 13 | void Delta_Init(Byte *state); 14 | void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size); 15 | void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); 16 | 17 | EXTERN_C_END 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /deps/libchdr/deps/lzma-24.05/include/LzHash.h: -------------------------------------------------------------------------------- 1 | /* LzHash.h -- HASH constants for LZ algorithms 2 | 2023-03-05 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef ZIP7_INC_LZ_HASH_H 5 | #define ZIP7_INC_LZ_HASH_H 6 | 7 | /* 8 | (kHash2Size >= (1 << 8)) : Required 9 | (kHash3Size >= (1 << 16)) : Required 10 | */ 11 | 12 | #define kHash2Size (1 << 10) 13 | #define kHash3Size (1 << 16) 14 | // #define kHash4Size (1 << 20) 15 | 16 | #define kFix3HashSize (kHash2Size) 17 | #define kFix4HashSize (kHash2Size + kHash3Size) 18 | // #define kFix5HashSize (kHash2Size + kHash3Size + kHash4Size) 19 | 20 | /* 21 | We use up to 3 crc values for hash: 22 | crc0 23 | crc1 << Shift_1 24 | crc2 << Shift_2 25 | (Shift_1 = 5) and (Shift_2 = 10) is good tradeoff. 26 | Small values for Shift are not good for collision rate. 27 | Big value for Shift_2 increases the minimum size 28 | of hash table, that will be slow for small files. 29 | */ 30 | 31 | #define kLzHash_CrcShift_1 5 32 | #define kLzHash_CrcShift_2 10 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /deps/libchdr/deps/lzma-24.05/include/Sort.h: -------------------------------------------------------------------------------- 1 | /* Sort.h -- Sort functions 2 | 2023-03-05 : Igor Pavlov : Public domain */ 3 | 4 | #ifndef ZIP7_INC_SORT_H 5 | #define ZIP7_INC_SORT_H 6 | 7 | #include "7zTypes.h" 8 | 9 | EXTERN_C_BEGIN 10 | 11 | void HeapSort(UInt32 *p, size_t size); 12 | void HeapSort64(UInt64 *p, size_t size); 13 | 14 | /* void HeapSortRef(UInt32 *p, UInt32 *vals, size_t size); */ 15 | 16 | EXTERN_C_END 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /deps/libchdr/deps/lzma-24.05/src/BraIA64.c: -------------------------------------------------------------------------------- 1 | /* BraIA64.c -- Converter for IA-64 code 2 | 2023-02-20 : Igor Pavlov : Public domain */ 3 | 4 | #include "Precomp.h" 5 | 6 | // the code was moved to Bra.c 7 | 8 | #ifdef _MSC_VER 9 | #pragma warning(disable : 4206) // nonstandard extension used : translation unit is empty 10 | #endif 11 | 12 | #if defined(__clang__) 13 | #pragma GCC diagnostic ignored "-Wempty-translation-unit" 14 | #endif 15 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright notice: 2 | 3 | (C) 1995-2022 Jean-loup Gailly and Mark Adler 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | 21 | Jean-loup Gailly Mark Adler 22 | jloup@gzip.org madler@alumni.caltech.edu 23 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | -@echo "Please use ./configure first. Thank you." 3 | 4 | distclean: 5 | make -f Makefile.in distclean 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/ada/zlib.gpr: -------------------------------------------------------------------------------- 1 | project Zlib is 2 | 3 | for Languages use ("Ada"); 4 | for Source_Dirs use ("."); 5 | for Object_Dir use "."; 6 | for Main use ("test.adb", "mtest.adb", "read.adb", "buffer_demo"); 7 | 8 | package Compiler is 9 | for Default_Switches ("ada") use ("-gnatwcfilopru", "-gnatVcdfimorst", "-gnatyabcefhiklmnoprst"); 10 | end Compiler; 11 | 12 | package Linker is 13 | for Default_Switches ("ada") use ("-lz"); 14 | end Linker; 15 | 16 | package Builder is 17 | for Default_Switches ("ada") use ("-s", "-gnatQ"); 18 | end Builder; 19 | 20 | end Zlib; 21 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/blast/Makefile: -------------------------------------------------------------------------------- 1 | blast: blast.c blast.h 2 | cc -DTEST -o blast blast.c 3 | 4 | test: blast 5 | blast < test.pk | cmp - test.txt 6 | 7 | clean: 8 | rm -f blast blast.o 9 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/blast/README: -------------------------------------------------------------------------------- 1 | Read blast.h for purpose and usage. 2 | 3 | Mark Adler 4 | madler@alumni.caltech.edu 5 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/blast/test.pk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/blast/test.pk -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/blast/test.txt: -------------------------------------------------------------------------------- 1 | AIAIAIAIAIAIA -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/delphi/ZLibConst.pas: -------------------------------------------------------------------------------- 1 | unit ZLibConst; 2 | 3 | interface 4 | 5 | resourcestring 6 | sTargetBufferTooSmall = 'ZLib error: target buffer may be too small'; 7 | sInvalidStreamOp = 'Invalid stream operation'; 8 | 9 | implementation 10 | 11 | end. 12 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib.build: -------------------------------------------------------------------------------- 1 |  2 | 3 | A .Net wrapper library around ZLib1.dll 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 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib.chm -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 8.00 2 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotZLib", "DotZLib\DotZLib.csproj", "{BB1EE0B1-1808-46CB-B786-949D91117FC5}" 3 | ProjectSection(ProjectDependencies) = postProject 4 | EndProjectSection 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfiguration) = preSolution 8 | Debug = Debug 9 | Release = Release 10 | EndGlobalSection 11 | GlobalSection(ProjectConfiguration) = postSolution 12 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.ActiveCfg = Debug|.NET 13 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Debug.Build.0 = Debug|.NET 14 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.ActiveCfg = Release|.NET 15 | {BB1EE0B1-1808-46CB-B786-949D91117FC5}.Release.Build.0 = Release|.NET 16 | EndGlobalSection 17 | GlobalSection(ExtensibilityGlobals) = postSolution 18 | EndGlobalSection 19 | GlobalSection(ExtensibilityAddIns) = postSolution 20 | EndGlobalSection 21 | EndGlobal 22 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/ChecksumImpl.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/ChecksumImpl.cs -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/CircularBuffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/CircularBuffer.cs -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/CodecBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/CodecBase.cs -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/Deflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/Deflater.cs -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/DotZLib.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/DotZLib.cs -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/GZipStream.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/GZipStream.cs -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/Inflater.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/dotzlib/DotZLib/Inflater.cs -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/infback9/README: -------------------------------------------------------------------------------- 1 | See infback9.h for what this is and how to use it. 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/iostream/test.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "zfstream.h" 3 | 4 | int main() { 5 | 6 | // Construct a stream object with this filebuffer. Anything sent 7 | // to this stream will go to standard out. 8 | gzofstream os( 1, ios::out ); 9 | 10 | // This text is getting compressed and sent to stdout. 11 | // To prove this, run 'test | zcat'. 12 | os << "Hello, Mommy" << endl; 13 | 14 | os << setcompressionlevel( Z_NO_COMPRESSION ); 15 | os << "hello, hello, hi, ho!" << endl; 16 | 17 | setcompressionlevel( os, Z_DEFAULT_COMPRESSION ) 18 | << "I'm compressing again" << endl; 19 | 20 | os.close(); 21 | 22 | return 0; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/iostream2/zstream_test.cpp: -------------------------------------------------------------------------------- 1 | #include "zstream.h" 2 | #include 3 | #include 4 | #include 5 | 6 | void main() { 7 | char h[256] = "Hello"; 8 | char* g = "Goodbye"; 9 | ozstream out("temp.gz"); 10 | out < "This works well" < h < g; 11 | out.close(); 12 | 13 | izstream in("temp.gz"); // read it back 14 | char *x = read_string(in), *y = new char[256], z[256]; 15 | in > y > z; 16 | in.close(); 17 | cout << x << endl << y << endl << z << endl; 18 | 19 | out.open("temp.gz"); // try ascii output; zcat temp.gz to see the results 20 | out << setw(50) << setfill('#') << setprecision(20) << x << endl << y << endl << z << endl; 21 | out << z << endl << y << endl << x << endl; 22 | out << 1.1234567890123456789 << endl; 23 | 24 | delete[] x; delete[] y; 25 | } 26 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/iostream3/TODO: -------------------------------------------------------------------------------- 1 | Possible upgrades to gzfilebuf: 2 | 3 | - The ability to do putback (e.g. putbackfail) 4 | 5 | - The ability to seek (zlib supports this, but could be slow/tricky) 6 | 7 | - Simultaneous read/write access (does it make sense?) 8 | 9 | - Support for ios_base::ate open mode 10 | 11 | - Locale support? 12 | 13 | - Check public interface to see which calls give problems 14 | (due to dependence on library internals) 15 | 16 | - Override operator<<(ostream&, gzfilebuf*) to allow direct copying 17 | of stream buffer to stream ( i.e. os << is.rdbuf(); ) 18 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/minizip/Makefile: -------------------------------------------------------------------------------- 1 | CC?=cc 2 | CFLAGS := $(CFLAGS) -O -I../.. 3 | 4 | UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a 5 | ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a 6 | 7 | .c.o: 8 | $(CC) -c $(CFLAGS) $*.c 9 | 10 | all: miniunz minizip 11 | 12 | miniunz: $(UNZ_OBJS) 13 | $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) 14 | 15 | minizip: $(ZIP_OBJS) 16 | $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) 17 | 18 | test: miniunz minizip 19 | @rm -f test.* 20 | @echo hello hello hello > test.txt 21 | ./minizip test test.txt 22 | ./miniunz -l test.zip 23 | @mv test.txt test.old 24 | ./miniunz test.zip 25 | @cmp test.txt test.old 26 | @rm -f test.* 27 | 28 | clean: 29 | /bin/rm -f *.o *~ minizip miniunz test.* 30 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/minizip/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libminizip.la 2 | 3 | if COND_DEMOS 4 | bin_PROGRAMS = miniunzip minizip 5 | endif 6 | 7 | zlib_top_srcdir = $(top_srcdir)/../.. 8 | zlib_top_builddir = $(top_builddir)/../.. 9 | 10 | AM_CPPFLAGS = -I$(zlib_top_srcdir) 11 | AM_LDFLAGS = -L$(zlib_top_builddir) 12 | 13 | if WIN32 14 | iowin32_src = iowin32.c 15 | iowin32_h = iowin32.h 16 | endif 17 | 18 | libminizip_la_SOURCES = \ 19 | ioapi.c \ 20 | mztools.c \ 21 | unzip.c \ 22 | zip.c \ 23 | ${iowin32_src} 24 | 25 | libminizip_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0 -lz 26 | 27 | minizip_includedir = $(includedir)/minizip 28 | minizip_include_HEADERS = \ 29 | crypt.h \ 30 | ioapi.h \ 31 | mztools.h \ 32 | unzip.h \ 33 | zip.h \ 34 | ${iowin32_h} 35 | 36 | pkgconfigdir = $(libdir)/pkgconfig 37 | pkgconfig_DATA = minizip.pc 38 | 39 | EXTRA_PROGRAMS = miniunzip minizip 40 | 41 | miniunzip_SOURCES = miniunz.c 42 | miniunzip_LDADD = libminizip.la 43 | 44 | minizip_SOURCES = minizip.c 45 | minizip_LDADD = libminizip.la -lz 46 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/minizip/MiniZip64_Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | MiniZip 1.1 was derived from MiniZip at version 1.01f 3 | 4 | Change in 1.0 (Okt 2009) 5 | - **TODO - Add history** 6 | 7 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/minizip/configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_INIT([minizip], [1.3.1], [bugzilla.redhat.com]) 5 | AC_CONFIG_SRCDIR([minizip.c]) 6 | AM_INIT_AUTOMAKE([foreign]) 7 | LT_INIT 8 | 9 | AC_MSG_CHECKING([whether to build example programs]) 10 | AC_ARG_ENABLE([demos], AC_HELP_STRING([--enable-demos], [build example programs])) 11 | AM_CONDITIONAL([COND_DEMOS], [test "$enable_demos" = yes]) 12 | if test "$enable_demos" = yes 13 | then 14 | AC_MSG_RESULT([yes]) 15 | else 16 | AC_MSG_RESULT([no]) 17 | fi 18 | 19 | case "${host}" in 20 | *-mingw* | mingw*) 21 | WIN32="yes" 22 | ;; 23 | *) 24 | ;; 25 | esac 26 | AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"]) 27 | 28 | 29 | AC_SUBST([HAVE_UNISTD_H], [0]) 30 | AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], []) 31 | AC_CONFIG_FILES([Makefile minizip.pc]) 32 | AC_OUTPUT 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/minizip/iowin32.h: -------------------------------------------------------------------------------- 1 | /* iowin32.h -- IO base function header for compress/uncompress .zip 2 | Version 1.1, February 14h, 2010 3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) 4 | 5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) 6 | 7 | Modifications for Zip64 support 8 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) 9 | 10 | For more info read MiniZip_info.txt 11 | 12 | */ 13 | 14 | #include 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void fill_win32_filefunc(zlib_filefunc_def* pzlib_filefunc_def); 22 | void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def); 23 | void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def); 24 | void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/minizip/make_vms.com: -------------------------------------------------------------------------------- 1 | $ if f$search("ioapi.h_orig") .eqs. "" then copy ioapi.h ioapi.h_orig 2 | $ open/write zdef vmsdefs.h 3 | $ copy sys$input: zdef 4 | $ deck 5 | #define unix 6 | #define fill_zlib_filefunc64_32_def_from_filefunc32 fillzffunc64from 7 | #define Write_Zip64EndOfCentralDirectoryLocator Write_Zip64EoDLocator 8 | #define Write_Zip64EndOfCentralDirectoryRecord Write_Zip64EoDRecord 9 | #define Write_EndOfCentralDirectoryRecord Write_EoDRecord 10 | $ eod 11 | $ close zdef 12 | $ copy vmsdefs.h,ioapi.h_orig ioapi.h 13 | $ cc/include=[--]/prefix=all ioapi.c 14 | $ cc/include=[--]/prefix=all miniunz.c 15 | $ cc/include=[--]/prefix=all unzip.c 16 | $ cc/include=[--]/prefix=all minizip.c 17 | $ cc/include=[--]/prefix=all zip.c 18 | $ link miniunz,unzip,ioapi,[--]libz.olb/lib 19 | $ link minizip,zip,ioapi,[--]libz.olb/lib 20 | $ mcr []minizip test minizip_info.txt 21 | $ mcr []miniunz -l test.zip 22 | $ rename minizip_info.txt; minizip_info.txt_old 23 | $ mcr []miniunz test.zip 24 | $ delete test.zip;* 25 | $exit 26 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/minizip/minizip.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@/minizip 5 | 6 | Name: minizip 7 | Description: Minizip zip file manipulation library 8 | Requires: 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lminizip 11 | Libs.private: -lz 12 | Cflags: -I${includedir} 13 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/minizip/mztools.h: -------------------------------------------------------------------------------- 1 | /* 2 | Additional tools for Minizip 3 | Code: Xavier Roche '2004 4 | License: Same as ZLIB (www.gzip.org) 5 | */ 6 | 7 | #ifndef _zip_tools_H 8 | #define _zip_tools_H 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | #ifndef _ZLIB_H 15 | #include "zlib.h" 16 | #endif 17 | 18 | #include "unzip.h" 19 | 20 | /* Repair a ZIP file (missing central directory) 21 | file: file to recover 22 | fileOut: output file after recovery 23 | fileOutTmp: temporary file name used for recovery 24 | */ 25 | extern int ZEXPORT unzRepair(const char* file, 26 | const char* fileOut, 27 | const char* fileOutTmp, 28 | uLong* nRecovered, 29 | uLong* bytesRecovered); 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/nuget/nuget.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.0.31903.59 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nuget", "nuget.csproj", "{B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(SolutionProperties) = preSolution 14 | HideSolutionNode = FALSE 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 | {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 | {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {B1BD3984-EF8F-4E9D-9A94-EB784E5EB1E8}.Release|Any CPU.Build.0 = Release|Any CPU 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/puff/zeros.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/contrib/puff/zeros.raw -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/testzlib/testzlib.txt: -------------------------------------------------------------------------------- 1 | To build testzLib with Visual Studio 2005: 2 | 3 | copy to a directory file from : 4 | - root of zLib tree 5 | - contrib/testzlib 6 | - contrib/masmx86 7 | - contrib/masmx64 8 | - contrib/vstudio/vc7 9 | 10 | and open testzlib8.sln -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/untgz/Makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-g 3 | 4 | untgz: untgz.o ../../libz.a 5 | $(CC) $(CFLAGS) -o untgz untgz.o -L../.. -lz 6 | 7 | untgz.o: untgz.c ../../zlib.h 8 | $(CC) $(CFLAGS) -c -I../.. untgz.c 9 | 10 | ../../libz.a: 11 | cd ../..; ./configure; make 12 | 13 | clean: 14 | rm -f untgz untgz.o *~ 15 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/untgz/Makefile.msc: -------------------------------------------------------------------------------- 1 | CC=cl 2 | CFLAGS=-MD 3 | 4 | untgz.exe: untgz.obj ..\..\zlib.lib 5 | $(CC) $(CFLAGS) untgz.obj ..\..\zlib.lib 6 | 7 | untgz.obj: untgz.c ..\..\zlib.h 8 | $(CC) $(CFLAGS) -c -I..\.. untgz.c 9 | 10 | ..\..\zlib.lib: 11 | cd ..\.. 12 | $(MAKE) -f win32\makefile.msc 13 | cd contrib\untgz 14 | 15 | clean: 16 | -del untgz.obj 17 | -del untgz.exe 18 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc10/miniunz.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {048af943-022b-4db6-beeb-a54c34774ee2} 6 | cpp;c;cxx;def;odl;idl;hpj;bat 7 | 8 | 9 | {c1d600d2-888f-4aea-b73e-8b0dd9befa0c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {0844199a-966b-4f19-81db-1e0125e141b9} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc10/minizip.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {c0419b40-bf50-40da-b153-ff74215b79de} 6 | cpp;c;cxx;def;odl;idl;hpj;bat 7 | 8 | 9 | {bb87b070-735b-478e-92ce-7383abb2f36c} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {f46ab6a6-548f-43cb-ae96-681abb5bd5db} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc10/testzlibdll.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {fa61a89f-93fc-4c89-b29e-36224b7592f4} 6 | cpp;c;cxx;def;odl;idl;hpj;bat 7 | 8 | 9 | {d4b85da0-2ba2-4934-b57f-e2584e3848ee} 10 | h;hpp;hxx;hm;inl;inc 11 | 12 | 13 | {e573e075-00bd-4a7d-bd67-a8cc9bfc5aca} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc10/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 3, 1, 0 6 | PRODUCTVERSION 1, 3, 1, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.3.1\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc11/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 3, 1, 0 6 | PRODUCTVERSION 1, 3, 1, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.3.1\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc12/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 3, 1, 0 6 | PRODUCTVERSION 1, 3, 1, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.3.1\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc14/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 3, 1, 0 6 | PRODUCTVERSION 1, 3, 1, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.3.1\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc17/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 3, 1, 0 6 | PRODUCTVERSION 1, 3, 1, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.3.1\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/contrib/vstudio/vc9/zlib.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define IDR_VERSION1 1 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 5 | FILEVERSION 1, 3, 1, 0 6 | PRODUCTVERSION 1, 3, 1, 0 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 8 | FILEFLAGS 0 9 | FILEOS VOS_DOS_WINDOWS32 10 | FILETYPE VFT_DLL 11 | FILESUBTYPE 0 // not used 12 | BEGIN 13 | BLOCK "StringFileInfo" 14 | BEGIN 15 | BLOCK "040904E4" 16 | //language ID = U.S. English, char set = Windows, Multilingual 17 | 18 | BEGIN 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" 20 | VALUE "FileVersion", "1.3.1\0" 21 | VALUE "InternalName", "zlib\0" 22 | VALUE "OriginalFilename", "zlibwapi.dll\0" 23 | VALUE "ProductName", "ZLib.DLL\0" 24 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" 25 | VALUE "LegalCopyright", "(C) 1995-2024 Jean-loup Gailly & Mark Adler\0" 26 | END 27 | END 28 | BLOCK "VarFileInfo" 29 | BEGIN 30 | VALUE "Translation", 0x0409, 1252 31 | END 32 | END 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/doc/crc-doc.1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/doc/crc-doc.1.0.pdf -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c -- zlib gzclose() function 2 | * Copyright (C) 2004, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | #include "gzguts.h" 7 | 8 | /* gzclose() is in a separate file so that it is linked in only if it is used. 9 | That way the other gzclose functions can be used instead to avoid linking in 10 | unneeded compression or decompression routines. */ 11 | int ZEXPORT gzclose(gzFile file) { 12 | #ifndef NO_GZCOMPRESS 13 | gz_statep state; 14 | 15 | if (file == NULL) 16 | return Z_STREAM_ERROR; 17 | state = (gz_statep)file; 18 | 19 | return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 20 | #else 21 | return gzclose_r(file); 22 | #endif 23 | } 24 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); 12 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/nintendods/README: -------------------------------------------------------------------------------- 1 | This Makefile requires devkitARM (http://www.devkitpro.org/category/devkitarm/) and works inside "contrib/nds". It is based on a devkitARM template. 2 | 3 | Eduardo Costa 4 | January 3, 2009 5 | 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/old/README: -------------------------------------------------------------------------------- 1 | This directory contains files that have not been updated for zlib 1.2.x 2 | 3 | (Volunteers are encouraged to help clean this up. Thanks.) 4 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/old/os2/zlib.def: -------------------------------------------------------------------------------- 1 | ; 2 | ; Slightly modified version of ../nt/zlib.dnt :-) 3 | ; 4 | 5 | LIBRARY Z 6 | DESCRIPTION "Zlib compression library for OS/2" 7 | CODE PRELOAD MOVEABLE DISCARDABLE 8 | DATA PRELOAD MOVEABLE MULTIPLE 9 | 10 | EXPORTS 11 | adler32 12 | compress 13 | crc32 14 | deflate 15 | deflateCopy 16 | deflateEnd 17 | deflateInit2_ 18 | deflateInit_ 19 | deflateParams 20 | deflateReset 21 | deflateSetDictionary 22 | gzclose 23 | gzdopen 24 | gzerror 25 | gzflush 26 | gzopen 27 | gzread 28 | gzwrite 29 | inflate 30 | inflateEnd 31 | inflateInit2_ 32 | inflateInit_ 33 | inflateReset 34 | inflateSetDictionary 35 | inflateSync 36 | uncompress 37 | zlibVersion 38 | gzprintf 39 | gzputc 40 | gzgetc 41 | gzseek 42 | gzrewind 43 | gztell 44 | gzeof 45 | gzsetparams 46 | zError 47 | inflateSyncPoint 48 | get_crc_table 49 | compress2 50 | gzputs 51 | gzgets 52 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/win32/VisualC.txt: -------------------------------------------------------------------------------- 1 | 2 | To build zlib using the Microsoft Visual C++ environment, 3 | use the appropriate project from the contrib/vstudio/ directory. 4 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/win32/zlib1.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../zlib.h" 3 | 4 | #ifdef GCC_WINDRES 5 | VS_VERSION_INFO VERSIONINFO 6 | #else 7 | VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE 8 | #endif 9 | FILEVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 10 | PRODUCTVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 11 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 12 | #ifdef _DEBUG 13 | FILEFLAGS 1 14 | #else 15 | FILEFLAGS 0 16 | #endif 17 | FILEOS VOS__WINDOWS32 18 | FILETYPE VFT_DLL 19 | FILESUBTYPE 0 // not used 20 | BEGIN 21 | BLOCK "StringFileInfo" 22 | BEGIN 23 | BLOCK "040904E4" 24 | //language ID = U.S. English, char set = Windows, Multilingual 25 | BEGIN 26 | VALUE "FileDescription", "zlib data compression library\0" 27 | VALUE "FileVersion", ZLIB_VERSION "\0" 28 | VALUE "InternalName", "zlib1.dll\0" 29 | VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0" 30 | VALUE "OriginalFilename", "zlib1.dll\0" 31 | VALUE "ProductName", "zlib\0" 32 | VALUE "ProductVersion", ZLIB_VERSION "\0" 33 | VALUE "Comments", "For more information visit http://www.zlib.net/\0" 34 | END 35 | END 36 | BLOCK "VarFileInfo" 37 | BEGIN 38 | VALUE "Translation", 0x0409, 1252 39 | END 40 | END 41 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/zlib.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zlib-1.3.1/zlib.3.pdf -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/zlib.pc.cmakein: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@INSTALL_LIB_DIR@ 4 | sharedlibdir=@INSTALL_LIB_DIR@ 5 | includedir=@INSTALL_INC_DIR@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zlib-1.3.1/zlib.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | sharedlibdir=@sharedlibdir@ 5 | includedir=@includedir@ 6 | 7 | Name: zlib 8 | Description: zlib compression library 9 | Version: @VERSION@ 10 | 11 | Requires: 12 | Libs: -L${libdir} -L${sharedlibdir} -lz 13 | Cflags: -I${includedir} 14 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.buckconfig: -------------------------------------------------------------------------------- 1 | [cxx] 2 | cppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4 3 | cflags = -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement -Wstrict-prototypes -Wundef -Wpointer-arith 4 | cxxppflags = -DXXH_NAMESPACE=ZSTD_ -DZSTD_LEGACY_SUPPORT=4 5 | cxxflags = -std=c++11 -Wno-deprecated-declarations 6 | gtest_dep = //contrib/pzstd:gtest 7 | 8 | [httpserver] 9 | port = 0 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.buckversion: -------------------------------------------------------------------------------- 1 | c8dec2e8da52d483f6dd7c6cd2ad694e8e6fed2b 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.circleci/images/primary/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM circleci/buildpack-deps@sha256:f6f10c11b7b8ccfd4f4a5b830c3256803604ce61292b60cb22e26b12f62b0e8c 2 | 3 | RUN sudo dpkg --add-architecture i386 4 | RUN sudo apt-get -y -qq update 5 | RUN sudo apt-get -y install \ 6 | gcc-multilib-powerpc-linux-gnu gcc-arm-linux-gnueabi \ 7 | libc6-dev-armel-cross gcc-aarch64-linux-gnu libc6-dev-arm64-cross \ 8 | libc6-dev-ppc64-powerpc-cross zstd gzip coreutils \ 9 | libcurl4-openssl-dev 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.cirrus.yml: -------------------------------------------------------------------------------- 1 | task: 2 | name: FreeBSD (shortest) 3 | freebsd_instance: 4 | matrix: 5 | image_family: freebsd-14-0 6 | image_family: freebsd-13-2 7 | install_script: pkg install -y gmake coreutils 8 | script: | 9 | MOREFLAGS="-Werror" gmake -j all 10 | gmake shortest 11 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior 2 | * text eol=lf 3 | 4 | # Explicitly declare source files 5 | *.c text eol=lf 6 | *.h text eol=lf 7 | 8 | # Denote files that should not be modified. 9 | *.odt binary 10 | *.png binary 11 | 12 | # Visual Studio 13 | *.sln text eol=crlf 14 | *.vcxproj* text eol=crlf 15 | *.vcproj* text eol=crlf 16 | *.suo binary 17 | *.rc text eol=crlf 18 | 19 | # Windows 20 | *.bat text eol=crlf 21 | *.cmd text eol=crlf 22 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Downloads data '...' 16 | 2. Run '...' with flags '...' 17 | 3. Scroll up on the log to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots and charts** 24 | If applicable, add screenshots and charts to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. Mac] 28 | - Version [e.g. 22] 29 | - Compiler [e.g. gcc] 30 | - Flags [e.g. O2] 31 | - Other relevant hardware specs [e.g. Dual-core] 32 | - Build system [e.g. Makefile] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.dSYM 5 | 6 | # Libraries 7 | *.lib 8 | *.a 9 | 10 | # Shared objects (inc. Windows DLLs) 11 | *.dll 12 | *.so 13 | *.so.* 14 | *.dylib 15 | 16 | # Executables 17 | /zstd 18 | zstdmt 19 | *.exe 20 | *.out 21 | *.app 22 | 23 | # Test artefacts 24 | tmp* 25 | *.zst 26 | *.zstd 27 | dictionary. 28 | dictionary 29 | NUL 30 | cmakebuild/ 31 | install/ 32 | 33 | # Build artefacts 34 | contrib/linux-kernel/linux/ 35 | projects/ 36 | bin/ 37 | .buckd/ 38 | buck-out/ 39 | build-* 40 | *.gcda 41 | 42 | # IDE 43 | .clang_complete 44 | compile_flags.txt 45 | .clang-format 46 | 47 | # Other files 48 | .directory 49 | _codelite/ 50 | _zstdbench/ 51 | *.idea 52 | *.swp 53 | .DS_Store 54 | googletest/ 55 | *.d 56 | *.vscode 57 | *.code-workspace 58 | compile_commands.json 59 | .clangd 60 | perf.data 61 | perf.data.old 62 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | Facebook has adopted a Code of Conduct that we expect project participants to adhere to. 4 | Please read the [full text](https://code.fb.com/codeofconduct/) 5 | so that you can understand what actions will and will not be tolerated. 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting and Fixing Security Issues 2 | 3 | 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: 4 | 5 | https://www.facebook.com/whitehat 6 | 7 | Meta's security team will triage your report and determine whether or not is it eligible for a bounty under our program. 8 | 9 | # Receiving Vulnerability Notifications 10 | 11 | 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. 12 | 13 | If you believe your project would benefit from inclusion in this list, please reach out to one of the maintainers. 14 | 15 | 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/VS2005/README.md: -------------------------------------------------------------------------------- 1 | ## Project Support Notice 2 | 3 | The VS2005 Project directory has been moved to the contrib directory in order to indicate that it will no longer be supported. 4 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/cleanTabs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sed -i '' $'s/\t/ /g' ../lib/**/*.{h,c} ../programs/*.{h,c} ../tests/*.c ./**/*.{h,cpp} ../examples/*.c ../zlibWrapper/*.{h,c} 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/diagnose_corruption/.gitignore: -------------------------------------------------------------------------------- 1 | check_flipped_bits 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # Dockerfile 2 | # First image to build the binary 3 | FROM alpine@sha256:69665d02cb32192e52e07644d76bc6f25abeb5410edc1c7a81a10ba3f0efb90a as builder 4 | 5 | RUN apk --no-cache add make gcc libc-dev 6 | COPY . /src 7 | RUN mkdir /pkg && cd /src && make && make DESTDIR=/pkg install 8 | 9 | # Second minimal image to only keep the built binary 10 | FROM alpine@sha256:69665d02cb32192e52e07644d76bc6f25abeb5410edc1c7a81a10ba3f0efb90a 11 | 12 | # Copy the built files 13 | COPY --from=builder /pkg / 14 | 15 | # Copy the license as well 16 | RUN mkdir -p /usr/local/share/licenses/zstd 17 | COPY --from=builder /src/LICENSE /usr/local/share/licences/zstd/ 18 | 19 | # Just run `zstd` if no other command is given 20 | CMD ["/usr/local/bin/zstd"] 21 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/docker/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Requirement 3 | 4 | The `Dockerfile` script requires a version of `docker` >= 17.05 5 | 6 | ## Installing docker 7 | 8 | The official docker install docs use a ppa with a modern version available: 9 | https://docs.docker.com/install/linux/docker-ce/ubuntu/ 10 | 11 | ## How to run 12 | 13 | `docker build -t zstd .` 14 | 15 | ## test 16 | 17 | ``` 18 | echo foo | docker run -i --rm zstd | docker run -i --rm zstd zstdcat 19 | foo 20 | ``` 21 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/externalSequenceProducer/.gitignore: -------------------------------------------------------------------------------- 1 | # build artifacts 2 | externalSequenceProducer 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/externalSequenceProducer/README.md: -------------------------------------------------------------------------------- 1 | externalSequenceProducer 2 | ===================== 3 | 4 | `externalSequenceProducer` is a test tool for the Block-Level Sequence Producer API. 5 | It demonstrates how to use the API to perform a simple round-trip test. 6 | 7 | A sample sequence producer is provided in sequence_producer.c, but the user can swap 8 | this out with a different one if desired. The sample sequence producer implements 9 | LZ parsing with a 1KB hashtable. Dictionary-based parsing is not currently supported. 10 | 11 | Command line : 12 | ``` 13 | externalSequenceProducer filename 14 | ``` 15 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/externalSequenceProducer/sequence_producer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Yann Collet, Meta Platforms, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | #ifndef MATCHFINDER_H 12 | #define MATCHFINDER_H 13 | 14 | #define ZSTD_STATIC_LINKING_ONLY 15 | #include "zstd.h" 16 | 17 | size_t simpleSequenceProducer( 18 | void* sequenceProducerState, 19 | ZSTD_Sequence* outSeqs, size_t outSeqsCapacity, 20 | const void* src, size_t srcSize, 21 | const void* dict, size_t dictSize, 22 | int compressionLevel, 23 | size_t windowSize 24 | ); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/gen_html/.gitignore: -------------------------------------------------------------------------------- 1 | # make artefact 2 | gen_html 3 | zstd_manual.html 4 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/gen_html/README.md: -------------------------------------------------------------------------------- 1 | gen_html - a program for automatic generation of zstd manual 2 | ============================================================ 3 | 4 | #### Introduction 5 | 6 | This simple C++ program generates a single-page HTML manual from `zstd.h`. 7 | 8 | The format of recognized comment blocks is following: 9 | - comments of type `/*!` mean: this is a function declaration; switch comments with declarations 10 | - comments of type `/**` and `/*-` mean: this is a comment; use a `

` header for the first line 11 | - comments of type `/*=` and `/**=` mean: use a `

` header and show also all functions until first empty line 12 | - comments of type `/*X` where `X` is different from above-mentioned are ignored 13 | 14 | Moreover: 15 | - `ZSTDLIB_API` is removed to improve readability 16 | - `typedef` are detected and included even if uncommented 17 | - comments of type `/**<` and `/*!<` are detected and only function declaration is highlighted (bold) 18 | 19 | 20 | #### Usage 21 | 22 | The program requires 3 parameters: 23 | ``` 24 | gen_html [zstd_version] [input_file] [output_html] 25 | ``` 26 | 27 | To compile program and generate zstd manual we have used: 28 | ``` 29 | make 30 | ./gen_html.exe 1.1.1 ../../lib/zstd.h zstd_manual.html 31 | ``` 32 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/gen_html/gen-zstd-manual.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | LIBVER_MAJOR_SCRIPT=`sed -n '/define ZSTD_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` 4 | LIBVER_MINOR_SCRIPT=`sed -n '/define ZSTD_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` 5 | LIBVER_PATCH_SCRIPT=`sed -n '/define ZSTD_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < ../../lib/zstd.h` 6 | LIBVER_SCRIPT=$LIBVER_MAJOR_SCRIPT.$LIBVER_MINOR_SCRIPT.$LIBVER_PATCH_SCRIPT 7 | 8 | echo ZSTD_VERSION=$LIBVER_SCRIPT 9 | ./gen_html $LIBVER_SCRIPT ../../lib/zstd.h ./zstd_manual.html 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/largeNbDicts/.gitignore: -------------------------------------------------------------------------------- 1 | # build artifacts 2 | largeNbDicts 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/largeNbDicts/README.md: -------------------------------------------------------------------------------- 1 | largeNbDicts 2 | ===================== 3 | 4 | `largeNbDicts` is a benchmark test tool 5 | dedicated to the specific scenario of 6 | dictionary decompression using a very large number of dictionaries. 7 | When dictionaries are constantly changing, they are always "cold", 8 | suffering from increased latency due to cache misses. 9 | 10 | The tool is created in a bid to investigate performance for this scenario, 11 | and experiment mitigation techniques. 12 | 13 | Command line : 14 | ``` 15 | largeNbDicts [Options] filename(s) 16 | 17 | Options : 18 | -z : benchmark compression (default) 19 | -d : benchmark decompression 20 | -r : recursively load all files in subdirectories (default: off) 21 | -B# : split input into blocks of size # (default: no split) 22 | -# : use compression level # (default: 3) 23 | -D # : use # as a dictionary (default: create one) 24 | -i# : nb benchmark rounds (default: 6) 25 | --nbBlocks=#: use # blocks for bench (default: one per file) 26 | --nbDicts=# : create # dictionaries for bench (default: one per block) 27 | -h : help (this text) 28 | 29 | Advanced Options (see zstd.h for documentation) : 30 | --dedicated-dict-search 31 | --dict-content-type=# 32 | --dict-attach-pref=# 33 | ``` 34 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/.gitignore: -------------------------------------------------------------------------------- 1 | !lib/zstd 2 | !lib/zstd/* 3 | *.o 4 | *.a 5 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/README.md: -------------------------------------------------------------------------------- 1 | # Zstd in the Linux Kernel 2 | 3 | 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. 4 | 5 | ## Upgrading Zstd in the Linux Kernel 6 | 7 | 1. `cd` into this directory. 8 | 2. Run `make libzstd` and read the output. Make sure that all the diffs printed and changes made by the script are correct. 9 | 3. Run `make test` and ensure that it passes. 10 | 4. Import zstd into the Linux Kernel `make import LINUX=/path/to/linux/repo` 11 | 5. Inspect the diff for sanity. 12 | 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. 13 | 7. Test the diff. Benchmark if necessary. Make sure to test multiple architectures: At least x86, i386, and arm. 14 | 8. Submit the patch to the LKML. 15 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/decompress_sources.h: -------------------------------------------------------------------------------- 1 | /* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */ 2 | /* 3 | * Copyright (c) Meta Platforms, Inc. and affiliates. 4 | * All rights reserved. 5 | * 6 | * This source code is licensed under both the BSD-style license (found in the 7 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 8 | * in the COPYING file in the root directory of this source tree). 9 | * You may select, at your option, one of the above-listed licenses. 10 | */ 11 | 12 | /* 13 | * This file includes every .c file needed for decompression. 14 | * It is used by lib/decompress_unzstd.c to include the decompression 15 | * source into the translation-unit, so it can be used for kernel 16 | * decompression. 17 | */ 18 | 19 | /* 20 | * Disable the ASM Huffman implementation because we need to 21 | * include all the sources. 22 | */ 23 | #define ZSTD_DISABLE_ASM 1 24 | 25 | #include "common/debug.c" 26 | #include "common/entropy_common.c" 27 | #include "common/error_private.c" 28 | #include "common/fse_decompress.c" 29 | #include "common/zstd_common.c" 30 | #include "decompress/huf_decompress.c" 31 | #include "decompress/zstd_ddict.c" 32 | #include "decompress/zstd_decompress.c" 33 | #include "decompress/zstd_decompress_block.c" 34 | #include "zstd_decompress_module.c" 35 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/compiler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_COMPILER_H 11 | #define LINUX_COMPILER_H 12 | 13 | #ifndef inline 14 | #define inline __inline __attribute__((unused)) 15 | #endif 16 | 17 | #ifndef noinline 18 | #define noinline __attribute__((noinline)) 19 | #endif 20 | 21 | #define fallthrough __attribute__((__fallthrough__)) 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/errno.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_ERRNO_H 11 | #define LINUX_ERRNO_H 12 | 13 | #define EINVAL 22 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/kernel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_KERNEL_H 11 | #define LINUX_KERNEL_H 12 | 13 | #define WARN_ON(x) 14 | 15 | #define PTR_ALIGN(p, a) (typeof(p))ALIGN((unsigned long long)(p), (a)) 16 | #define ALIGN(x, a) ALIGN_MASK((x), (a) - 1) 17 | #define ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_LIMITS_H 11 | #define LINUX_LIMITS_H 12 | 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/math64.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_MATH64_H 11 | #define LINUX_MATH64_H 12 | 13 | #define div_u64(dividend, divisor) ((dividend) / (divisor)) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/module.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_MODULE_H 11 | #define LINUX_MODULE_H 12 | 13 | #define EXPORT_SYMBOL(symbol) \ 14 | void* __##symbol = symbol 15 | #define EXPORT_SYMBOL_GPL(symbol) \ 16 | void* __##symbol = symbol 17 | #define MODULE_LICENSE(license) 18 | #define MODULE_DESCRIPTION(description) 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/printk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_PRINTK_H 11 | #define LINUX_PRINTK_H 12 | 13 | #define pr_debug(...) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/stddef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_STDDEF_H 11 | #define LINUX_STDDEF_H 12 | 13 | #include 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/swab.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_SWAB_H 11 | #define LINUX_SWAB_H 12 | 13 | #define swab32(x) __builtin_bswap32((x)) 14 | #define swab64(x) __builtin_bswap64((x)) 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/include/linux/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | #ifndef LINUX_TYPES_H 11 | #define LINUX_TYPES_H 12 | 13 | #include 14 | #include 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/test/macro-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -e 4 | 5 | SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd) 6 | INCLUDE_DIR="$SCRIPT_DIR/../linux/include" 7 | LIB_DIR="$SCRIPT_DIR/../linux/lib" 8 | 9 | 10 | print() { 11 | printf '%b' "${*}" 12 | } 13 | 14 | println() { 15 | printf '%b\n' "${*}" 16 | } 17 | 18 | die() { 19 | println "$@" 1>&2 20 | exit 1 21 | } 22 | 23 | test_not_present() { 24 | print "Testing that '$1' is not present... " 25 | grep -r $1 "$INCLUDE_DIR" "$LIB_DIR" && die "Fail!" 26 | println "Okay" 27 | } 28 | 29 | println "This test checks that the macro removal process worked as expected" 30 | println "If this test fails, then freestanding.py wasn't able to remove one of these" 31 | println "macros from the source code completely. You'll either need to rewrite the check" 32 | println "or improve freestanding.py." 33 | println "" 34 | 35 | test_not_present "ZSTD_NO_INTRINSICS" 36 | test_not_present "ZSTD_NO_UNUSED_FUNCTIONS" 37 | test_not_present "ZSTD_LEGACY_SUPPORT" 38 | test_not_present "STATIC_BMI2" 39 | test_not_present "ZSTD_DLL_EXPORT" 40 | test_not_present "ZSTD_DLL_IMPORT" 41 | test_not_present "__ICCARM__" 42 | test_not_present "_MSC_VER" 43 | test_not_present "_WIN32" 44 | test_not_present "__linux__" 45 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/linux-kernel/zstd_common_module.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause 2 | /* 3 | * Copyright (c) Meta Platforms, Inc. and affiliates. 4 | * All rights reserved. 5 | * 6 | * This source code is licensed under both the BSD-style license (found in the 7 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 8 | * in the COPYING file in the root directory of this source tree). 9 | * You may select, at your option, one of the above-listed licenses. 10 | */ 11 | 12 | #include 13 | 14 | #include "common/huf.h" 15 | #include "common/fse.h" 16 | #include "common/zstd_internal.h" 17 | 18 | // Export symbols shared by compress and decompress into a common module 19 | 20 | #undef ZSTD_isError /* defined within zstd_internal.h */ 21 | EXPORT_SYMBOL_GPL(FSE_readNCount); 22 | EXPORT_SYMBOL_GPL(HUF_readStats); 23 | EXPORT_SYMBOL_GPL(HUF_readStats_wksp); 24 | EXPORT_SYMBOL_GPL(ZSTD_isError); 25 | EXPORT_SYMBOL_GPL(ZSTD_getErrorName); 26 | EXPORT_SYMBOL_GPL(ZSTD_getErrorCode); 27 | 28 | MODULE_LICENSE("Dual BSD/GPL"); 29 | MODULE_DESCRIPTION("Zstd Common"); 30 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/premake/premake4.lua: -------------------------------------------------------------------------------- 1 | -- Include zstd.lua in your GENie or premake4 file, which exposes a project_zstd function 2 | dofile('zstd.lua') 3 | 4 | solution 'example' 5 | configurations { 'Debug', 'Release' } 6 | project_zstd('../../lib/') 7 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/.gitignore: -------------------------------------------------------------------------------- 1 | # compilation result 2 | pzstd 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/SkippableFrame.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | */ 9 | #include "SkippableFrame.h" 10 | #include "mem.h" 11 | #include "utils/Range.h" 12 | 13 | #include 14 | 15 | using namespace pzstd; 16 | 17 | SkippableFrame::SkippableFrame(std::uint32_t size) : frameSize_(size) { 18 | MEM_writeLE32(data_.data(), kSkippableFrameMagicNumber); 19 | MEM_writeLE32(data_.data() + 4, kFrameContentsSize); 20 | MEM_writeLE32(data_.data() + 8, frameSize_); 21 | } 22 | 23 | /* static */ std::size_t SkippableFrame::tryRead(ByteRange bytes) { 24 | if (bytes.size() < SkippableFrame::kSize || 25 | MEM_readLE32(bytes.begin()) != kSkippableFrameMagicNumber || 26 | MEM_readLE32(bytes.begin() + 4) != kFrameContentsSize) { 27 | return 0; 28 | } 29 | return MEM_readLE32(bytes.begin() + 8); 30 | } 31 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/images/Cspeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/images/Cspeed.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/images/Dspeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/images/Dspeed.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | */ 9 | #include "ErrorHolder.h" 10 | #include "Options.h" 11 | #include "Pzstd.h" 12 | 13 | using namespace pzstd; 14 | 15 | int main(int argc, const char** argv) { 16 | Options options; 17 | switch (options.parse(argc, argv)) { 18 | case Options::Status::Failure: 19 | return 1; 20 | case Options::Status::Message: 21 | return 0; 22 | default: 23 | break; 24 | } 25 | 26 | return pzstdMain(options); 27 | } 28 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/test/BUCK: -------------------------------------------------------------------------------- 1 | cxx_test( 2 | name='options_test', 3 | srcs=['OptionsTest.cpp'], 4 | deps=['//contrib/pzstd:options'], 5 | ) 6 | 7 | cxx_test( 8 | name='pzstd_test', 9 | srcs=['PzstdTest.cpp'], 10 | deps=[ 11 | ':round_trip', 12 | '//contrib/pzstd:libpzstd', 13 | '//contrib/pzstd/utils:scope_guard', 14 | '//programs:datagen', 15 | ], 16 | ) 17 | 18 | cxx_binary( 19 | name='round_trip_test', 20 | srcs=['RoundTripTest.cpp'], 21 | deps=[ 22 | ':round_trip', 23 | '//contrib/pzstd/utils:scope_guard', 24 | '//programs:datagen', 25 | ] 26 | ) 27 | 28 | cxx_library( 29 | name='round_trip', 30 | header_namespace='test', 31 | exported_headers=['RoundTrip.h'], 32 | deps=[ 33 | '//contrib/pzstd:libpzstd', 34 | '//contrib/pzstd:options', 35 | '//contrib/pzstd/utils:scope_guard', 36 | ] 37 | ) 38 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/utils/Likely.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | */ 9 | 10 | /** 11 | * Compiler hints to indicate the fast path of an "if" branch: whether 12 | * the if condition is likely to be true or false. 13 | * 14 | * @author Tudor Bosman (tudorb@fb.com) 15 | */ 16 | 17 | #pragma once 18 | 19 | #undef LIKELY 20 | #undef UNLIKELY 21 | 22 | #if defined(__GNUC__) && __GNUC__ >= 4 23 | #define LIKELY(x) (__builtin_expect((x), 1)) 24 | #define UNLIKELY(x) (__builtin_expect((x), 0)) 25 | #else 26 | #define LIKELY(x) (x) 27 | #define UNLIKELY(x) (x) 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/utils/Portability.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | */ 9 | 10 | #pragma once 11 | 12 | #include 13 | 14 | // Required for windows, which defines min/max, but we want the std:: version. 15 | #undef min 16 | #undef max 17 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/utils/test/BUCK: -------------------------------------------------------------------------------- 1 | cxx_test( 2 | name='buffer_test', 3 | srcs=['BufferTest.cpp'], 4 | deps=['//contrib/pzstd/utils:buffer'], 5 | ) 6 | 7 | cxx_test( 8 | name='range_test', 9 | srcs=['RangeTest.cpp'], 10 | deps=['//contrib/pzstd/utils:range'], 11 | ) 12 | 13 | cxx_test( 14 | name='resource_pool_test', 15 | srcs=['ResourcePoolTest.cpp'], 16 | deps=['//contrib/pzstd/utils:resource_pool'], 17 | ) 18 | 19 | cxx_test( 20 | name='scope_guard_test', 21 | srcs=['ScopeGuardTest.cpp'], 22 | deps=['//contrib/pzstd/utils:scope_guard'], 23 | ) 24 | 25 | cxx_test( 26 | name='thread_pool_test', 27 | srcs=['ThreadPoolTest.cpp'], 28 | deps=['//contrib/pzstd/utils:thread_pool'], 29 | ) 30 | 31 | cxx_test( 32 | name='work_queue_test', 33 | srcs=['RangeTest.cpp'], 34 | deps=['//contrib/pzstd/utils:work_queue'], 35 | ) 36 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/pzstd/utils/test/ScopeGuardTest.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | */ 9 | #include "utils/ScopeGuard.h" 10 | 11 | #include 12 | 13 | using namespace pzstd; 14 | 15 | TEST(ScopeGuard, Dismiss) { 16 | { 17 | auto guard = makeScopeGuard([&] { EXPECT_TRUE(false); }); 18 | guard.dismiss(); 19 | } 20 | } 21 | 22 | TEST(ScopeGuard, Executes) { 23 | bool executed = false; 24 | { 25 | auto guard = makeScopeGuard([&] { executed = true; }); 26 | } 27 | EXPECT_TRUE(executed); 28 | } 29 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/seekable_format/examples/.gitignore: -------------------------------------------------------------------------------- 1 | seekable_compression 2 | seekable_decompression 3 | seekable_decompression_mem 4 | parallel_processing 5 | parallel_compression 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/seekable_format/tests/.gitignore: -------------------------------------------------------------------------------- 1 | seekable_tests 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/seekable_format/tests/Makefile: -------------------------------------------------------------------------------- 1 | # ################################################################ 2 | # Copyright (c) Meta Platforms, Inc. and affiliates. 3 | # All rights reserved. 4 | # 5 | # This source code is licensed under both the BSD-style license (found in the 6 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | # in the COPYING file in the root directory of this source tree). 8 | # ################################################################ 9 | 10 | # This Makefile presumes libzstd is built, using `make` in / or /lib/ 11 | 12 | ZSTDLIB_PATH = ../../../lib 13 | ZSTDLIB_NAME = libzstd.a 14 | ZSTDLIB = $(ZSTDLIB_PATH)/$(ZSTDLIB_NAME) 15 | 16 | CPPFLAGS += -DXXH_NAMESPACE=ZSTD_ -I../ -I$(ZSTDLIB_PATH) -I$(ZSTDLIB_PATH)/common 17 | 18 | CFLAGS ?= -O3 19 | CFLAGS += -g -Wall -Wextra -Wcast-qual -Wcast-align -Wconversion \ 20 | -Wformat=2 -Wstrict-aliasing=1 21 | 22 | SEEKABLE_OBJS = ../zstdseek_compress.c ../zstdseek_decompress.c $(ZSTDLIB) 23 | 24 | .PHONY: default clean test 25 | default: test 26 | 27 | test: seekable_tests 28 | ./seekable_tests 29 | 30 | $(ZSTDLIB): 31 | $(MAKE) -C $(ZSTDLIB_PATH) $(ZSTDLIB_NAME) 32 | 33 | seekable_tests : $(SEEKABLE_OBJS) 34 | 35 | clean: 36 | @$(RM) core *.o tmp* result* *.zst \ 37 | seekable_tests 38 | @echo Cleaning completed 39 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/contrib/snap/snapcraft.yaml: -------------------------------------------------------------------------------- 1 | name: zstd 2 | version: git 3 | summary: Zstandard - Fast real-time compression algorithm 4 | description: | 5 | Zstandard, or zstd as short version, is a fast lossless compression 6 | algorithm, targeting real-time compression scenarios at zlib-level and better 7 | compression ratios. It's backed by a very fast entropy stage, provided by 8 | Huff0 and FSE library 9 | 10 | grade: devel # must be 'stable' to release into candidate/stable channels 11 | confinement: devmode # use 'strict' once you have the right plugs and slots 12 | 13 | apps: 14 | zstd: 15 | command: usr/local/bin/zstd 16 | plugs: [home, removable-media] 17 | zstdgrep: 18 | command: usr/local/bin/zstdgrep 19 | plugs: [home, removable-media] 20 | zstdless: 21 | command: usr/local/bin/zstdless 22 | plugs: [home, removable-media] 23 | 24 | parts: 25 | zstd: 26 | source: . 27 | plugin: make 28 | build-packages: [g++] 29 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/educational_decoder/.gitignore: -------------------------------------------------------------------------------- 1 | # Build artifacts 2 | harness 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/CSpeed2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/CSpeed2.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/DCspeed5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/DCspeed5.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/DSpeed3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/DSpeed3.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/cdict_v136.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/cdict_v136.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/dict-cr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/dict-cr.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/dict-cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/dict-cs.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/dict-ds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/dict-ds.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/zstd_cdict_v1_3_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/zstd_cdict_v1_3_5.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/doc/images/zstd_logo86.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/doc/images/zstd_logo86.png -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/examples/.gitignore: -------------------------------------------------------------------------------- 1 | #build 2 | simple_compression 3 | simple_decompression 4 | multiple_simple_compression 5 | dictionary_compression 6 | dictionary_decompression 7 | streaming_compression 8 | streaming_decompression 9 | multiple_streaming_compression 10 | streaming_memory_usage 11 | 12 | #test artefact 13 | tmp* 14 | test* 15 | *.zst 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/lib/.gitignore: -------------------------------------------------------------------------------- 1 | # make install artefact 2 | libzstd.pc 3 | libzstd-nomt 4 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/lib/common/debug.c: -------------------------------------------------------------------------------- 1 | /* ****************************************************************** 2 | * debug 3 | * Part of FSE library 4 | * Copyright (c) Meta Platforms, Inc. and affiliates. 5 | * 6 | * You can contact the author at : 7 | * - Source repository : https://github.com/Cyan4973/FiniteStateEntropy 8 | * 9 | * This source code is licensed under both the BSD-style license (found in the 10 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 11 | * in the COPYING file in the root directory of this source tree). 12 | * You may select, at your option, one of the above-listed licenses. 13 | ****************************************************************** */ 14 | 15 | 16 | /* 17 | * This module only hosts one global variable 18 | * which can be used to dynamically influence the verbosity of traces, 19 | * such as DEBUGLOG and RAWLOG 20 | */ 21 | 22 | #include "debug.h" 23 | 24 | #if !defined(ZSTD_LINUX_KERNEL) || (DEBUGLEVEL>=2) 25 | /* We only use this when DEBUGLEVEL>=2, but we get -Werror=pedantic errors if a 26 | * translation unit is empty. So remove this from Linux kernel builds, but 27 | * otherwise just leave it in. 28 | */ 29 | int g_debuglevel = DEBUGLEVEL; 30 | #endif 31 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/lib/common/xxhash.c: -------------------------------------------------------------------------------- 1 | /* 2 | * xxHash - Extremely Fast Hash algorithm 3 | * Copyright (c) Yann Collet - Meta Platforms, Inc 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | /* 12 | * xxhash.c instantiates functions defined in xxhash.h 13 | */ 14 | 15 | #define XXH_STATIC_LINKING_ONLY /* access advanced declarations */ 16 | #define XXH_IMPLEMENTATION /* access definitions */ 17 | 18 | #include "xxhash.h" 19 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/lib/compress/zstd_compress_superblock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | #ifndef ZSTD_COMPRESS_ADVANCED_H 12 | #define ZSTD_COMPRESS_ADVANCED_H 13 | 14 | /*-************************************* 15 | * Dependencies 16 | ***************************************/ 17 | 18 | #include "../zstd.h" /* ZSTD_CCtx */ 19 | 20 | /*-************************************* 21 | * Target Compressed Block Size 22 | ***************************************/ 23 | 24 | /* ZSTD_compressSuperBlock() : 25 | * Used to compress a super block when targetCBlockSize is being used. 26 | * The given block will be compressed into multiple sub blocks that are around targetCBlockSize. */ 27 | size_t ZSTD_compressSuperBlock(ZSTD_CCtx* zc, 28 | void* dst, size_t dstCapacity, 29 | void const* src, size_t srcSize, 30 | unsigned lastBlock); 31 | 32 | #endif /* ZSTD_COMPRESS_ADVANCED_H */ 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/lib/deprecated/zbuff_common.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | /*-************************************* 12 | * Dependencies 13 | ***************************************/ 14 | #include "../common/error_private.h" 15 | #include "zbuff.h" 16 | 17 | /*-**************************************** 18 | * ZBUFF Error Management (deprecated) 19 | ******************************************/ 20 | 21 | /*! ZBUFF_isError() : 22 | * tells if a return value is an error code */ 23 | unsigned ZBUFF_isError(size_t errorCode) { return ERR_isError(errorCode); } 24 | /*! ZBUFF_getErrorName() : 25 | * provides error code string from function result (useful for debugging) */ 26 | const char* ZBUFF_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); } 27 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/lib/dll/example/build_package.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | MKDIR bin\dll bin\static bin\example bin\include 3 | COPY tests\fullbench.c bin\example\ 4 | COPY programs\datagen.c bin\example\ 5 | COPY programs\datagen.h bin\example\ 6 | COPY programs\util.h bin\example\ 7 | COPY programs\platform.h bin\example\ 8 | COPY lib\common\mem.h bin\example\ 9 | COPY lib\common\zstd_internal.h bin\example\ 10 | COPY lib\common\error_private.h bin\example\ 11 | COPY lib\common\xxhash.h bin\example\ 12 | COPY lib\libzstd.a bin\static\libzstd_static.lib 13 | COPY lib\dll\libzstd.* bin\dll\ 14 | COPY lib\dll\example\Makefile bin\example\ 15 | COPY lib\dll\example\fullbench-dll.* bin\example\ 16 | COPY lib\dll\example\README.md bin\ 17 | COPY lib\zstd.h bin\include\ 18 | COPY lib\common\zstd_errors.h bin\include\ 19 | COPY lib\dictBuilder\zdict.h bin\include\ 20 | COPY programs\zstd.exe bin\zstd.exe 21 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/lib/libzstd.pc.in: -------------------------------------------------------------------------------- 1 | # ZSTD - standard compression algorithm 2 | # Copyright (c) Meta Platforms, Inc. and affiliates. 3 | # BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php) 4 | 5 | prefix=@PREFIX@ 6 | exec_prefix=@EXEC_PREFIX@ 7 | includedir=@INCLUDEDIR@ 8 | libdir=@LIBDIR@ 9 | 10 | Name: zstd 11 | Description: fast lossless compression algorithm library 12 | URL: https://facebook.github.io/zstd/ 13 | Version: @VERSION@ 14 | Libs: -L${libdir} -lzstd 15 | Libs.private: @LIBS_PRIVATE@ 16 | Cflags: -I${includedir} 17 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/lib/module.modulemap: -------------------------------------------------------------------------------- 1 | module libzstd [extern_c] { 2 | header "zstd.h" 3 | export * 4 | config_macros [exhaustive] \ 5 | /* zstd.h */ \ 6 | ZSTD_STATIC_LINKING_ONLY, \ 7 | ZSTDLIB_VISIBILITY, \ 8 | ZSTDLIB_VISIBLE, \ 9 | ZSTDLIB_HIDDEN, \ 10 | ZSTD_DLL_EXPORT, \ 11 | ZSTDLIB_STATIC_API, \ 12 | ZSTD_DISABLE_DEPRECATE_WARNINGS, \ 13 | ZSTD_CLEVEL_DEFAULT, \ 14 | /* zdict.h */ \ 15 | ZDICT_STATIC_LINKING_ONLY, \ 16 | ZDICTLIB_VISIBLE, \ 17 | ZDICTLIB_HIDDEN, \ 18 | ZDICTLIB_VISIBILITY, \ 19 | ZDICTLIB_STATIC_API, \ 20 | ZDICT_DISABLE_DEPRECATE_WARNINGS, \ 21 | /* zstd_errors.h */ \ 22 | ZSTDERRORLIB_VISIBLE, \ 23 | ZSTDERRORLIB_HIDDEN, \ 24 | ZSTDERRORLIB_VISIBILITY 25 | 26 | module dictbuilder [extern_c] { 27 | header "zdict.h" 28 | export * 29 | } 30 | 31 | module errors [extern_c] { 32 | header "zstd_errors.h" 33 | export * 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/.gitignore: -------------------------------------------------------------------------------- 1 | # local binary (Makefile) 2 | zstd 3 | zstd32 4 | zstd4 5 | zstd-compress 6 | zstd-decompress 7 | zstd-frugal 8 | zstd-small 9 | zstd-nolegacy 10 | zstd-dictBuilder 11 | zstd-dll 12 | zstd_arm64 13 | zstd_x64 14 | 15 | # Object files 16 | *.o 17 | *.ko 18 | default.profraw 19 | have_zlib 20 | 21 | # Executables 22 | *.exe 23 | *.out 24 | *.app 25 | 26 | # Default result files 27 | dictionary 28 | grillResults.txt 29 | _* 30 | tmp* 31 | *.zst 32 | result 33 | out 34 | 35 | # fuzzer 36 | afl 37 | 38 | # Misc files 39 | *.bat 40 | !windres/generate_res.bat 41 | dirTest* 42 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/BUCK: -------------------------------------------------------------------------------- 1 | cxx_binary( 2 | name='zstd', 3 | headers=glob(['*.h'], excludes=['datagen.h', 'platform.h', 'util.h']), 4 | srcs=glob(['*.c'], excludes=['datagen.c']), 5 | deps=[ 6 | ':datagen', 7 | ':util', 8 | '//lib:zstd', 9 | '//lib:zdict', 10 | '//lib:mem', 11 | '//lib:xxhash', 12 | ], 13 | preprocessor_flags=[ 14 | '-DZSTD_GZCOMPRESS', 15 | '-DZSTD_GZDECOMPRESS', 16 | '-DZSTD_LZMACOMPRESS', 17 | '-DZSTD_LZMADECOMPRES', 18 | '-DZSTD_LZ4COMPRESS', 19 | '-DZSTD_LZ4DECOMPRES', 20 | ], 21 | linker_flags=[ 22 | '-lz', 23 | '-llzma', 24 | '-llz4', 25 | ], 26 | ) 27 | 28 | cxx_library( 29 | name='datagen', 30 | visibility=['PUBLIC'], 31 | header_namespace='', 32 | exported_headers=['datagen.h'], 33 | srcs=['datagen.c'], 34 | deps=['//lib:mem'], 35 | ) 36 | 37 | 38 | cxx_library( 39 | name='util', 40 | visibility=['PUBLIC'], 41 | header_namespace='', 42 | exported_headers=['util.h', 'platform.h'], 43 | deps=['//lib:mem'], 44 | ) 45 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/datagen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | 12 | #ifndef DATAGEN_H 13 | #define DATAGEN_H 14 | 15 | #include /* size_t */ 16 | 17 | void RDG_genStdout(unsigned long long size, double matchProba, double litProba, unsigned seed); 18 | void RDG_genBuffer(void* buffer, size_t size, double matchProba, double litProba, unsigned seed); 19 | /*!RDG_genBuffer 20 | Generate 'size' bytes of compressible data into 'buffer'. 21 | Compressibility can be controlled using 'matchProba', which is floating point value between 0 and 1. 22 | 'LitProba' is optional, it affect variability of individual bytes. If litProba==0.0, default value will be used. 23 | Generated data pattern can be modified using different 'seed'. 24 | For a triplet (matchProba, litProba, seed), the function always generate the same content. 25 | 26 | RDG_genStdout 27 | Same as RDG_genBuffer, but generates data into stdout 28 | */ 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/lorem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | /* lorem ipsum generator */ 12 | 13 | #include /* size_t */ 14 | 15 | /* 16 | * LOREM_genBuffer(): 17 | * Generate @size bytes of compressible data using lorem ipsum generator 18 | * into provided @buffer. 19 | */ 20 | void LOREM_genBuffer(void* buffer, size_t size, unsigned seed); 21 | 22 | /* 23 | * LOREM_genBlock(): 24 | * Similar to LOREM_genBuffer, with additional controls : 25 | * - @first : generate the first sentence 26 | * - @fill : fill the entire @buffer, 27 | * if ==0: generate one paragraph at most. 28 | * @return : nb of bytes generated into @buffer. 29 | */ 30 | size_t LOREM_genBlock(void* buffer, size_t size, 31 | unsigned seed, 32 | int first, int fill); 33 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/windres/verrsrc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | /* minimal set of defines required to generate zstd.res from zstd.rc */ 11 | 12 | #define VS_VERSION_INFO 1 13 | 14 | #define VS_FFI_FILEFLAGSMASK 0x0000003FL 15 | #define VOS_NT_WINDOWS32 0x00040004L 16 | #define VFT_DLL 0x00000002L 17 | #define VFT2_UNKNOWN 0x00000000L 18 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/windres/zstd32.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/programs/windres/zstd32.res -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/windres/zstd64.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/programs/windres/zstd64.res -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/zstdcli_trace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | #ifndef ZSTDCLI_TRACE_H 12 | #define ZSTDCLI_TRACE_H 13 | 14 | /** 15 | * Enable tracing - log to filename. 16 | */ 17 | void TRACE_enable(char const* filename); 18 | 19 | /** 20 | * Shut down the tracing library. 21 | */ 22 | void TRACE_finish(void); 23 | 24 | #endif /* ZSTDCLI_TRACE_H */ 25 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/zstdgrep.1: -------------------------------------------------------------------------------- 1 | . 2 | .TH "ZSTDGREP" "1" "March 2024" "zstd 1.5.6" "User Commands" 3 | . 4 | .SH "NAME" 5 | \fBzstdgrep\fR \- print lines matching a pattern in zstandard\-compressed files 6 | . 7 | .SH "SYNOPSIS" 8 | \fBzstdgrep\fR [\fIgrep\-flags\fR] [\-\-] \fIpattern\fR [\fIfiles\fR \.\.\.] 9 | . 10 | .SH "DESCRIPTION" 11 | \fBzstdgrep\fR runs \fBgrep\fR(1) on files, or \fBstdin\fR if no files argument is given, after decompressing them with \fBzstdcat\fR(1)\. 12 | . 13 | .P 14 | The \fIgrep\-flags\fR and \fIpattern\fR arguments are passed on to \fBgrep\fR(1)\. If an \fB\-e\fR flag is found in the \fIgrep\-flags\fR, \fBzstdgrep\fR will not look for a \fIpattern\fR argument\. 15 | . 16 | .P 17 | Note that modern \fBgrep\fR alternatives such as \fBripgrep\fR (\fBrg\fR(1)) support \fBzstd\fR\-compressed files out of the box, and can prove better alternatives than \fBzstdgrep\fR notably for unsupported complex pattern searches\. Note though that such alternatives may also feature some minor command line differences\. 18 | . 19 | .SH "EXIT STATUS" 20 | In case of missing arguments or missing pattern, 1 will be returned, otherwise 0\. 21 | . 22 | .SH "SEE ALSO" 23 | \fBzstd\fR(1) 24 | . 25 | .SH "AUTHORS" 26 | Thomas Klausner \fIwiz@NetBSD\.org\fR 27 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/zstdgrep.1.md: -------------------------------------------------------------------------------- 1 | zstdgrep(1) -- print lines matching a pattern in zstandard-compressed files 2 | ============================================================================ 3 | 4 | SYNOPSIS 5 | -------- 6 | 7 | `zstdgrep` [] [--] [ ...] 8 | 9 | 10 | DESCRIPTION 11 | ----------- 12 | `zstdgrep` runs `grep`(1) on files, or `stdin` if no files argument is given, after decompressing them with `zstdcat`(1). 13 | 14 | The and arguments are passed on to `grep`(1). If an `-e` flag is found in the , `zstdgrep` will not look for a argument. 15 | 16 | Note that modern `grep` alternatives such as `ripgrep` (`rg`(1)) support `zstd`-compressed files out of the box, 17 | and can prove better alternatives than `zstdgrep` notably for unsupported complex pattern searches. 18 | Note though that such alternatives may also feature some minor command line differences. 19 | 20 | EXIT STATUS 21 | ----------- 22 | In case of missing arguments or missing pattern, 1 will be returned, otherwise 0. 23 | 24 | SEE ALSO 25 | -------- 26 | `zstd`(1) 27 | 28 | AUTHORS 29 | ------- 30 | Thomas Klausner 31 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/zstdless: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | zstd=${ZSTD:-zstd} 4 | 5 | # TODO: Address quirks and bugs tied to old versions of less, provide a mechanism to pass flags directly to zstd 6 | 7 | export LESSOPEN="|-${zstd} -cdfq %s" 8 | exec less "$@" 9 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/zstdless.1: -------------------------------------------------------------------------------- 1 | . 2 | .TH "ZSTDLESS" "1" "March 2024" "zstd 1.5.6" "User Commands" 3 | . 4 | .SH "NAME" 5 | \fBzstdless\fR \- view zstandard\-compressed files 6 | . 7 | .SH "SYNOPSIS" 8 | \fBzstdless\fR [\fIflags\fR] [\fIfile\fR \.\.\.] 9 | . 10 | .SH "DESCRIPTION" 11 | \fBzstdless\fR runs \fBless\fR(1) on files or stdin, if no \fIfile\fR argument is given, after decompressing them with \fBzstdcat\fR(1)\. 12 | . 13 | .SH "SEE ALSO" 14 | \fBzstd\fR(1) 15 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/programs/zstdless.1.md: -------------------------------------------------------------------------------- 1 | zstdless(1) -- view zstandard-compressed files 2 | ============================================================================ 3 | 4 | SYNOPSIS 5 | -------- 6 | 7 | `zstdless` [] [ ...] 8 | 9 | 10 | DESCRIPTION 11 | ----------- 12 | `zstdless` runs `less`(1) on files or stdin, if no argument is given, after decompressing them with `zstdcat`(1). 13 | 14 | SEE ALSO 15 | -------- 16 | `zstd`(1) 17 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/.gitignore: -------------------------------------------------------------------------------- 1 | # local binary (Makefile) 2 | fullbench 3 | fullbench32 4 | fullbench-lib 5 | fuzzer 6 | fuzzer32 7 | fuzzer-dll 8 | zbufftest 9 | zbufftest32 10 | zbufftest-dll 11 | zstreamtest 12 | zstreamtest32 13 | zstreamtest_asan 14 | zstreamtest_tsan 15 | zstreamtest_ubsan 16 | zstreamtest-dll 17 | datagen 18 | paramgrill 19 | paramgrill32 20 | roundTripCrash 21 | longmatch 22 | symbols 23 | legacy 24 | decodecorpus 25 | pool 26 | poolTests 27 | invalidDictionaries 28 | checkTag 29 | zcat 30 | zstdcat 31 | tm 32 | 33 | # test artifacts 34 | dictionary 35 | grillResults.txt 36 | _* 37 | tmp* 38 | *.zst 39 | *.gz 40 | !gzip/hufts-segv.gz 41 | result 42 | out 43 | *.zstd 44 | hello* 45 | world 46 | 47 | # Tmp test directory 48 | zstdtest 49 | speedTest 50 | versionsTest 51 | namespaceTest 52 | dirTest* 53 | 54 | # fuzzer 55 | afl 56 | 57 | # Local script 58 | startSpeedTest 59 | speedTest.pid 60 | *.bat 61 | 62 | # Generic Object files 63 | *.o 64 | *.ko 65 | 66 | # Generic Executables 67 | *.exe 68 | *.out 69 | *.app 70 | 71 | # Specific exclusions 72 | !golden-decompression/*.zst 73 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/check_size.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # ################################################################ 3 | # Copyright (c) Meta Platforms, Inc. and affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under both the BSD-style license (found in the 7 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 8 | # in the COPYING file in the root directory of this source tree). 9 | # You may select, at your option, one of the above-listed licenses. 10 | # ################################################################ 11 | 12 | import os 13 | import subprocess 14 | import sys 15 | 16 | if len(sys.argv) != 3: 17 | print(f"Usage: {sys.argv[0]} FILE SIZE_LIMIT") 18 | sys.exit(1) 19 | 20 | file = sys.argv[1] 21 | limit = int(sys.argv[2]) 22 | 23 | if not os.path.exists(file): 24 | print(f"{file} does not exist") 25 | sys.exit(1) 26 | 27 | size = os.path.getsize(file) 28 | 29 | if size > limit: 30 | print(f"file {file} is {size} bytes, which is greater than the limit of {limit} bytes") 31 | sys.exit(1) 32 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/.gitignore: -------------------------------------------------------------------------------- 1 | !bin/ 2 | !datagen 3 | !zstdcat 4 | 5 | scratch/ 6 | bin/symlinks 7 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/args.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | println "+ zstd --blah" >&2 4 | zstd --blah 5 | println "+ zstd -xz" >&2 6 | zstd -xz 7 | println "+ zstd --adapt=min=1,maxx=2 file.txt" >&2 8 | zstd --adapt=min=1,maxx=2 file.txt 9 | println "+ zstd --train-cover=k=48,d=8,steps32 file.txt" >&2 10 | zstd --train-cover=k=48,d=8,steps32 file.txt 11 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/args.sh.exit: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/args.sh.stderr.glob: -------------------------------------------------------------------------------- 1 | + zstd --blah 2 | Incorrect parameter: --blah 3 | ... 4 | Usage: zstd * 5 | 6 | Options: 7 | ... 8 | + zstd -xz 9 | Incorrect parameter: -x 10 | ... 11 | Usage: zstd * 12 | 13 | Options: 14 | ... 15 | + zstd --adapt=min=1,maxx=2 file.txt 16 | Incorrect parameter: --adapt=min=1,maxx=2 17 | ... 18 | Usage: zstd * 19 | 20 | Options: 21 | ... 22 | + zstd --train-cover=k=48,d=8,steps32 file.txt 23 | Incorrect parameter: --train-cover=k=48,d=8,steps32 24 | ... 25 | Usage: zstd * 26 | 27 | Options: 28 | ... 29 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/help.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | println "+ zstd -h" 6 | zstd -h 7 | println "+ zstd -H" 8 | zstd -H 9 | println "+ zstd --help" 10 | zstd --help 11 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/memlimit.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed 2 | error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed 3 | error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed 4 | error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed 5 | error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed 6 | error: only numeric values with optional suffixes K, KB, KiB, M, MB, MiB are allowed 7 | Should allow numeric parameter without suffix 8 | Should allow numeric parameter with expected suffix 9 | Should allow numeric parameter with expected suffix 10 | Should allow numeric parameter with expected suffix 11 | Should allow numeric parameter with expected suffix 12 | Should allow numeric parameter with expected suffix 13 | Should allow numeric parameter with expected suffix 14 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/memlimit.sh.stdout.exact: -------------------------------------------------------------------------------- 1 | + zstd --memory=32LB file 2 | + zstd --memory=32LiB file 3 | + zstd --memory=32A file 4 | + zstd --memory=32r82347dn83 file 5 | + zstd --memory=32asbdf file 6 | + zstd --memory=hello file 7 | + zstd --memory=1 file 8 | + zstd --memory=1K file 9 | + zstd --memory=1KB file 10 | + zstd --memory=1KiB file 11 | + zstd --memory=1M file 12 | + zstd --memory=1MB file 13 | + zstd --memory=1MiB file 14 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/output_dir.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | println "+ zstd -r * --output-dir-mirror=\"\"" 4 | zstd -r * --output-dir-mirror="" && die "Should not allow empty output dir!" 5 | println "+ zstd -r * --output-dir-flat=\"\"" 6 | zstd -r * --output-dir-flat="" && die "Should not allow empty output dir!" 7 | exit 0 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/output_dir.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | error: output dir cannot be empty string (did you mean to pass '.' instead?) 2 | error: output dir cannot be empty string (did you mean to pass '.' instead?) 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/output_dir.sh.stdout.exact: -------------------------------------------------------------------------------- 1 | + zstd -r * --output-dir-mirror="" 2 | + zstd -r * --output-dir-flat="" 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | zstd -V 6 | zstd --version 7 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/basic/version.sh.stdout.glob: -------------------------------------------------------------------------------- 1 | *** Zstandard CLI (*-bit) v1.*.*, by Yann Collet *** 2 | *** Zstandard CLI (*-bit) v1.*.*, by Yann Collet *** 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/cmp_size: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | usage() 6 | { 7 | printf "USAGE:\n\t$0 [-eq|-ne|-lt|-le|-gt|-ge] FILE1 FILE2\n" 8 | } 9 | 10 | help() 11 | { 12 | printf "Small utility to compare file sizes without printing them with set -x.\n\n" 13 | usage 14 | } 15 | 16 | case "$1" in 17 | -h) help; exit 0 ;; 18 | --help) help; exit 0 ;; 19 | esac 20 | 21 | if ! test -f $2; then 22 | printf "FILE1='%b' is not a file\n\n" "$2" 23 | usage 24 | exit 1 25 | fi 26 | 27 | if ! test -f $3; then 28 | printf "FILE2='%b' is not a file\n\n" "$3" 29 | usage 30 | exit 1 31 | fi 32 | 33 | 34 | size1=$(wc -c < $2) 35 | size2=$(wc -c < $3) 36 | 37 | case "$1" in 38 | -eq) [ "$size1" -eq "$size2" ] ;; 39 | -ne) [ "$size1" -ne "$size2" ] ;; 40 | -lt) [ "$size1" -lt "$size2" ] ;; 41 | -le) [ "$size1" -le "$size2" ] ;; 42 | -gt) [ "$size1" -gt "$size2" ] ;; 43 | -ge) [ "$size1" -ge "$size2" ] ;; 44 | esac 45 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/datagen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | "$DATAGEN_BIN" $@ 4 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/die: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | println "${*}" 1>&2 4 | exit 1 5 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/println: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | printf '%b\n' "${*}" 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/unzstd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | zstdname=$(basename $0) 4 | 5 | if [ -z "$EXEC_PREFIX" ]; then 6 | "$ZSTD_SYMLINK_DIR/$zstdname" $@ 7 | else 8 | $EXEC_PREFIX "$ZSTD_SYMLINK_DIR/$zstdname" $@ 9 | fi 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/zstd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | zstdname=$(basename $0) 4 | 5 | if [ -z "$EXEC_PREFIX" ]; then 6 | "$ZSTD_SYMLINK_DIR/$zstdname" $@ 7 | else 8 | $EXEC_PREFIX "$ZSTD_SYMLINK_DIR/$zstdname" $@ 9 | fi 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/zstdcat: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | zstdname=$(basename $0) 4 | 5 | if [ -z "$EXEC_PREFIX" ]; then 6 | "$ZSTD_SYMLINK_DIR/$zstdname" $@ 7 | else 8 | $EXEC_PREFIX "$ZSTD_SYMLINK_DIR/$zstdname" $@ 9 | fi 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/zstdgrep: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | "$ZSTDGREP_BIN" $@ 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/bin/zstdless: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | "$ZSTDLESS_BIN" $@ 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/cltools/setup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "1234" > file 6 | zstd file 7 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/cltools/zstdgrep.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | println "+ good path" 6 | zstdgrep "1234" file file.zst 7 | println "+ bad path" 8 | zstdgrep "1234" bad.zst 9 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/cltools/zstdgrep.sh.exit: -------------------------------------------------------------------------------- 1 | 1 -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/cltools/zstdgrep.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | zstd: can't stat bad.zst : No such file or directory -- ignored 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/cltools/zstdgrep.sh.stdout.glob: -------------------------------------------------------------------------------- 1 | + good path 2 | file:1234 3 | file.zst:1234 4 | + bad path 5 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/cltools/zstdless.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | println "+ good path" 6 | zstdless file.zst 7 | println "+ pass parameters" 8 | zstdless -N file.zst # This parameter does not produce line #s when piped, but still serves to test that the flag went to less and not zstd 9 | println "+ bad path" 10 | zstdless bad.zst >&2 11 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/cltools/zstdless.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | zstd: can't stat bad.zst : No such file or directory -- ignored 2 | bad.zst: No such file or directory 3 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/cltools/zstdless.sh.stdout.glob: -------------------------------------------------------------------------------- 1 | + good path 2 | 1234 3 | + pass parameters 4 | 1234 5 | + bad path 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/common/format.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . "$COMMON/platform.sh" 4 | 5 | zstd_supports_format() 6 | { 7 | zstd -h | grep > $INTOVOID -- "--format=$1" 8 | } 9 | 10 | format_extension() 11 | { 12 | if [ "$1" = "zstd" ]; then 13 | printf "zst" 14 | elif [ "$1" = "gzip" ]; then 15 | printf "gz" 16 | else 17 | printf "$1" 18 | fi 19 | } 20 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/common/mtime.sh: -------------------------------------------------------------------------------- 1 | . "$COMMON/platform.sh" 2 | 3 | MTIME="stat -c %Y" 4 | case "$UNAME" in 5 | Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;; 6 | esac 7 | 8 | assertSameMTime() { 9 | MT1=$($MTIME "$1") 10 | MT2=$($MTIME "$2") 11 | echo MTIME $MT1 $MT2 12 | [ "$MT1" = "$MT2" ] || die "mtime on $1 doesn't match mtime on $2 ($MT1 != $MT2)" 13 | } 14 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/common/permissions.sh: -------------------------------------------------------------------------------- 1 | . "$COMMON/platform.sh" 2 | 3 | GET_PERMS="stat -c %a" 4 | case "$UNAME" in 5 | Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;; 6 | esac 7 | 8 | assertFilePermissions() { 9 | STAT1=$($GET_PERMS "$1") 10 | STAT2=$2 11 | [ "$STAT1" = "$STAT2" ] || die "permissions on $1 don't match expected ($STAT1 != $STAT2)" 12 | } 13 | 14 | assertSamePermissions() { 15 | STAT1=$($GET_PERMS "$1") 16 | STAT2=$($GET_PERMS "$2") 17 | [ "$STAT1" = "$STAT2" ] || die "permissions on $1 don't match those on $2 ($STAT1 != $STAT2)" 18 | } 19 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/common/platform.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | UNAME=$(uname) 4 | 5 | isWindows=false 6 | INTOVOID="/dev/null" 7 | case "$UNAME" in 8 | GNU) DEVDEVICE="/dev/random" ;; 9 | *) DEVDEVICE="/dev/zero" ;; 10 | esac 11 | case "$OS" in 12 | Windows*) 13 | isWindows=true 14 | INTOVOID="NUL" 15 | DEVDEVICE="NUL" 16 | ;; 17 | esac 18 | 19 | case "$UNAME" in 20 | Darwin) MD5SUM="md5 -r" ;; 21 | FreeBSD) MD5SUM="gmd5sum" ;; 22 | NetBSD) MD5SUM="md5 -n" ;; 23 | OpenBSD) MD5SUM="md5" ;; 24 | *) MD5SUM="md5sum" ;; 25 | esac 26 | 27 | DIFF="diff" 28 | case "$UNAME" in 29 | SunOS) DIFF="gdiff" ;; 30 | esac 31 | 32 | if echo hello | zstd -v -T2 2>&1 > $INTOVOID | grep -q 'multi-threading is disabled' 33 | then 34 | hasMT="" 35 | else 36 | hasMT="true" 37 | fi 38 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/adapt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Test --adapt 6 | zstd -f file --adapt -c | zstd -t 7 | 8 | datagen -g100M > file100M 9 | 10 | # Pick parameters to force fast adaptation, even on slow systems 11 | zstd --adapt -vvvv -19 --zstd=wlog=10 file100M -o /dev/null 2>&1 | grep -q "faster speed , lighter compression" 12 | 13 | # Adaption still happens with --no-progress 14 | zstd --no-progress --adapt -vvvv -19 --zstd=wlog=10 file100M -o /dev/null 2>&1 | grep -q "faster speed , lighter compression" 15 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/basic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Uncomment the set -v line for debugging 6 | # set -v 7 | 8 | # Test compression flags and check that they work 9 | zstd file ; zstd -t file.zst 10 | zstd -f file ; zstd -t file.zst 11 | zstd -f -z file ; zstd -t file.zst 12 | zstd -f -k file ; zstd -t file.zst 13 | zstd -f -C file ; zstd -t file.zst 14 | zstd -f --check file ; zstd -t file.zst 15 | zstd -f --no-check file ; zstd -t file.zst 16 | zstd -f -- file ; zstd -t file.zst 17 | 18 | # Test output file compression 19 | zstd -o file-out.zst ; zstd -t file-out.zst 20 | zstd -fo file-out.zst; zstd -t file-out.zst 21 | 22 | # Test compression to stdout 23 | zstd -c file | zstd -t 24 | zstd --stdout file | zstd -t 25 | println bob | zstd | zstd -t 26 | 27 | # Test keeping input file when compressing to stdout in gzip mode 28 | if $(command -v $ZSTD_SYMLINK_DIR/gzip); then 29 | $ZSTD_SYMLINK_DIR/gzip -c file | zstd -t ; test -f file 30 | $ZSTD_SYMLINK_DIR/gzip --stdout file | zstd -t ; test -f file 31 | fi 32 | 33 | # Test --rm 34 | cp file file-rm 35 | zstd --rm file-rm; zstd -t file-rm.zst 36 | test ! -f file-rm 37 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/compress-literals.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Test --[no-]compress-literals 6 | zstd file --no-compress-literals -1 -c | zstd -t 7 | zstd file --no-compress-literals -19 -c | zstd -t 8 | zstd file --no-compress-literals --fast=1 -c | zstd -t 9 | zstd file --compress-literals -1 -c | zstd -t 10 | zstd file --compress-literals --fast=1 -c | zstd -t 11 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/format.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . "$COMMON/format.sh" 4 | 5 | set -e 6 | 7 | # Test --format 8 | zstd --format=zstd file -f 9 | zstd -t file.zst 10 | for format in "gzip" "lz4" "xz" "lzma"; do 11 | if zstd_supports_format $format; then 12 | zstd --format=$format file 13 | zstd -t file.$(format_extension $format) 14 | zstd -c --format=$format file | zstd -t --format=$format 15 | fi 16 | done 17 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/golden.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | GOLDEN_DIR="$ZSTD_REPO_DIR/tests/golden-compression/" 6 | cp -r "$GOLDEN_DIR" golden/ 7 | 8 | zstd -rf golden/ --output-dir-mirror golden-compressed/ 9 | zstd -r -t golden-compressed/ 10 | 11 | zstd --target-compressed-block-size=1024 -rf golden/ --output-dir-mirror golden-compressed/ 12 | zstd -r -t golden-compressed/ 13 | 14 | # PR #3517 block splitter corruption test 15 | zstd -rf -19 --zstd=mml=7 golden/ --output-dir-mirror golden-compressed/ 16 | zstd -r -t golden-compressed/ -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/gzip-compat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Uncomment the set -v line for debugging 6 | # set -v 7 | 8 | # Test gzip specific compression option 9 | if $(command -v $ZSTD_SYMLINK_DIR/gzip); then 10 | $ZSTD_SYMLINK_DIR/gzip --fast file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz 11 | $ZSTD_SYMLINK_DIR/gzip --best file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz 12 | 13 | # Test -n / --no-name: do not embed original filename in archive 14 | $ZSTD_SYMLINK_DIR/gzip -n file ; grep -qv file file.gz ; $ZSTD_SYMLINK_DIR/gzip -d file.gz 15 | $ZSTD_SYMLINK_DIR/gzip --no-name file ; grep -qv file file.gz ; $ZSTD_SYMLINK_DIR/gzip -d file.gz 16 | $ZSTD_SYMLINK_DIR/gzip -c --no-name file | grep -qv file 17 | fi 18 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/long-distance-matcher.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Test --long 6 | zstd -f file --long ; zstd -t file.zst 7 | zstd -f file --long=20; zstd -t file.zst 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/multi-threaded.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Test multi-threaded flags 6 | zstd --single-thread file -f -q ; zstd -t file.zst 7 | zstd -T2 -f file -q ; zstd -t file.zst 8 | zstd --rsyncable -f file -q ; zstd -t file.zst 9 | zstd -T0 -f file -q ; zstd -t file.zst 10 | zstd -T0 --auto-threads=logical -f file -q ; zstd -t file.zst 11 | zstd -T0 --auto-threads=physical -f file -q ; zstd -t file.zst 12 | 13 | # multi-thread decompression warning test 14 | zstd -T0 -f file -q ; zstd -t file.zst; zstd -T0 -d file.zst -o file3 15 | zstd -T0 -f file -q ; zstd -t file.zst; zstd -T2 -d file.zst -o file4 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/multi-threaded.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | file.zst : 65537 bytes 2 | file.zst : 65537 bytes 3 | file.zst : 65537 bytes 4 | file.zst : 65537 bytes 5 | file.zst : 65537 bytes 6 | file.zst : 65537 bytes 7 | file.zst : 65537 bytes 8 | file.zst : 65537 bytes 9 | file.zst : 65537 bytes 10 | Warning : decompression does not support multi-threading 11 | file.zst : 65537 bytes 12 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/multiple-files.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # setup 5 | echo "file1" > file1 6 | echo "file2" > file2 7 | 8 | echo "Test zstd ./file1 - file2" 9 | rm -f ./file*.zst 10 | echo "stdin" | zstd ./file1 - ./file2 | zstd -d 11 | cat file1.zst | zstd -d 12 | cat file2.zst | zstd -d 13 | 14 | echo "Test zstd -d ./file1.zst - file2.zst" 15 | rm ./file1 ./file2 16 | echo "stdin" | zstd - | zstd -d ./file1.zst - file2.zst 17 | cat file1 18 | cat file2 19 | 20 | echo "zstd -d ./file1.zst - file2.zst -c" 21 | echo "stdin" | zstd | zstd -d ./file1.zst - file2.zst -c 22 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/multiple-files.sh.stdout.exact: -------------------------------------------------------------------------------- 1 | Test zstd ./file1 - file2 2 | stdin 3 | file1 4 | file2 5 | Test zstd -d ./file1.zst - file2.zst 6 | stdin 7 | file1 8 | file2 9 | zstd -d ./file1.zst - file2.zst -c 10 | file1 11 | stdin 12 | file2 13 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/row-match-finder.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Test --[no-]row-match-finder 6 | zstd file -7f --row-match-finder 7 | zstd file -7f --no-row-match-finder 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/setup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen > file 6 | datagen > file0 7 | datagen > file1 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/stream-size.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # Test stream size & hint 6 | datagen -g7654 | zstd --stream-size=7654 | zstd -t 7 | datagen -g7654 | zstd --size-hint=7000 | zstd -t 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/verbose-wlog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . "$COMMON/platform.sh" 6 | 7 | zstd < file -vv -19 -o file.19.zst 8 | zstd -vv -l file.19.zst 9 | 10 | zstd < file -vv -19 --long -o file.19.long.zst 11 | zstd -vv -l file.19.long.zst 12 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/verbose-wlog.sh.stderr.glob: -------------------------------------------------------------------------------- 1 | ... 2 | *wlog=23* 3 | ... 4 | *wlog=27* 5 | ... 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/verbose-wlog.sh.stdout.glob: -------------------------------------------------------------------------------- 1 | ... 2 | *Window Size: 8388608 B* 3 | ... 4 | *Window Size: 134217728 B* 5 | ... 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/window-resize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | datagen -g1G > file 3 | zstd --long=30 -1 --single-thread --no-content-size -f file 4 | zstd -l -v file.zst 5 | 6 | # We want to ignore stderr (its outputting "*** zstd command line interface 7 | # 64-bits v1.5.3, by Yann Collet ***") 8 | 9 | rm file file.zst 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/window-resize.sh.stderr.ignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/window-resize.sh.stderr.ignore -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/compression/window-resize.sh.stdout.glob: -------------------------------------------------------------------------------- 1 | ... 2 | Window Size: 1.000 GiB (1073741824 B) 3 | ... 4 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/decompression/detectErrors.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | GOLDEN_DIR="$ZSTD_REPO_DIR/tests/golden-decompression-errors/" 6 | 7 | for file in "$GOLDEN_DIR"/*; do 8 | zstd -t $file && die "should have detected an error" 9 | done 10 | exit 0 11 | 12 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/decompression/golden.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | GOLDEN_DIR="$ZSTD_REPO_DIR/tests/golden-decompression/" 6 | 7 | zstd -r -t "$GOLDEN_DIR" 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/decompression/pass-through.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | file :230.00% ( 10 B => 23 B, file.zst) 2 | zstd: file: unsupported format 3 | zstd: file: unsupported format 4 | zstd: file: unsupported format 5 | zstd: file: unsupported format 6 | zstd: /*stdin*\: unsupported format 7 | zstd: file: unsupported format 8 | zstd: file: unsupported format 9 | zstd: /*stdin*\: unsupported format 10 | zstd: /*stdin*\: unsupported format 11 | zstd: file: unsupported format 12 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/decompression/pass-through.sh.stdout.exact: -------------------------------------------------------------------------------- 1 | + passthrough enabled 2 | 3 | 2 4 | 23 5 | 234 6 | some data 7 | some data 8 | some data 9 | some data 10 | some data 11 | some data 12 | some data 13 | some data 14 | some data 15 | some data 16 | some data 17 | some data 18 | some data 19 | some data 20 | some data 21 | some data 22 | + passthrough disabled 23 | some data 24 | some data 25 | some data 26 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dict-builder/empty-input.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | for i in $(seq 50); do 4 | datagen -s$i > file$i 5 | done 6 | touch empty 7 | 8 | set -v 9 | zstd -q --train empty file* 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dict-builder/empty-input.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | zstd -q --train empty file* 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dict-builder/no-inputs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -v 3 | zstd --train 4 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dict-builder/no-inputs.sh.exit: -------------------------------------------------------------------------------- 1 | 14 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dict-builder/no-inputs.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | zstd --train 2 | ! Warning : nb of samples too low for proper processing ! 3 | ! Please provide _one file per sample_. 4 | ! Alternatively, split files into fixed-size blocks representative of samples, with -B# 5 | Error 14 : nb of samples too low 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dictionaries/dictionary-mismatch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . "$COMMON/platform.sh" 4 | 5 | set -e 6 | 7 | if [ false ]; then 8 | for seed in $(seq 100); do 9 | datagen -g1000 -s$seed > file$seed 10 | done 11 | 12 | zstd --train -r . -o dict0 -qq 13 | 14 | for seed in $(seq 101 200); do 15 | datagen -g1000 -s$seed > file$seed 16 | done 17 | 18 | zstd --train -r . -o dict1 -qq 19 | 20 | [ "$($MD5SUM < dict0)" != "$($MD5SUM < dict1)" ] || die "dictionaries must not match" 21 | 22 | datagen -g1000 -s0 > file0 23 | fi 24 | 25 | set -v 26 | zstd files/0 -D dicts/0 -q 27 | zstd -t files/0.zst -D dicts/0 28 | zstd -t files/0.zst -D dicts/1 && die "Must fail" ||: 29 | zstd -t files/0.zst && die "Must fail" ||: 30 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dictionaries/dictionary-mismatch.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | zstd files/0 -D dicts/0 -q 2 | zstd -t files/0.zst -D dicts/0 3 | files/0.zst : 1000 bytes 4 | zstd -t files/0.zst -D dicts/1 && die "Must fail" ||: 5 | files/0.zst : Decoding error (36) : Dictionary mismatch 6 | zstd -t files/0.zst && die "Must fail" ||: 7 | files/0.zst : Decoding error (36) : Dictionary mismatch 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dictionaries/golden.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | GOLDEN_COMP_DIR="$ZSTD_REPO_DIR/tests/golden-compression/" 6 | GOLDEN_DICT_DIR="$ZSTD_REPO_DIR/tests/golden-dictionaries/" 7 | 8 | zstd -D "$GOLDEN_DICT_DIR/http-dict-missing-symbols" "$GOLDEN_COMP_DIR/http" -o http.zst 9 | zstd -D "$GOLDEN_DICT_DIR/http-dict-missing-symbols" -t http.zst 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dictionaries/setup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | cp -r ../files . 6 | cp -r ../dicts . 7 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/dictionaries/setup_once: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | . "$COMMON/platform.sh" 6 | 7 | 8 | mkdir files/ dicts/ 9 | 10 | for seed in $(seq 50); do 11 | datagen -g1000 -s$seed > files/$seed 12 | done 13 | 14 | zstd --train -r files -o dicts/0 -qq 15 | 16 | for seed in $(seq 51 100); do 17 | datagen -g1000 -s$seed > files/$seed 18 | done 19 | 20 | zstd --train -r files -o dicts/1 -qq 21 | 22 | cmp dicts/0 dicts/1 && die "dictionaries must not match!" 23 | 24 | datagen -g1000 > files/0 25 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-handling/directory-mirror.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # setup 5 | mkdir -p src/.hidden src/dir 6 | mkdir mid dst 7 | 8 | echo "file1" > src/file1 9 | echo "file2" > src/.file2 10 | echo "file3" > src/.hidden/.file3 11 | echo "file4" > src/dir/.file4 12 | 13 | # relative paths 14 | zstd -q -r --output-dir-mirror mid/ src/ 15 | zstd -q -d -r --output-dir-mirror dst/ mid/src/ 16 | 17 | diff --brief --recursive --new-file src/ dst/mid/src/ 18 | 19 | # reset 20 | rm -rf mid dst 21 | mkdir mid dst 22 | 23 | # from inside the directory 24 | (cd src; zstd -q -r --output-dir-mirror ../mid/ ./) 25 | (cd mid; zstd -q -d -r --output-dir-mirror ../dst/ ./) 26 | 27 | diff --brief --recursive --new-file src/ dst/ 28 | 29 | # reset 30 | rm -rf mid dst 31 | mkdir mid dst 32 | 33 | # absolute paths 34 | export BASE_PATH="$(pwd)" 35 | 36 | zstd -q -r --output-dir-mirror mid/ "${BASE_PATH}/src/" 37 | zstd -q -d -r --output-dir-mirror dst/ "${BASE_PATH}/mid/${BASE_PATH}/src/" 38 | 39 | diff --brief --recursive --new-file src/ "dst/${BASE_PATH}/mid/${BASE_PATH}/src/" 40 | 41 | # reset 42 | rm -rf mid dst 43 | mkdir mid dst 44 | 45 | # dots 46 | zstd -q -r --output-dir-mirror mid/ ./src/./ 47 | zstd -q -d -r --output-dir-mirror dst/ ./mid/./src/./ 48 | 49 | diff --brief --recursive --new-file src/ dst/mid/src/ 50 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # motivated by issue #3523 4 | 5 | datagen > file 6 | mkdir out 7 | chmod 000 out 8 | 9 | zstd file -q --trace-file-stat -o out/file.zst 10 | zstd -tq out/file.zst 11 | 12 | chmod 777 out 13 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | Trace:FileStat: > UTIL_isLink(file) 2 | Trace:FileStat: < 0 3 | Trace:FileStat: > UTIL_isConsole(2) 4 | Trace:FileStat: < 0 5 | Trace:FileStat: > UTIL_getFileSize(file) 6 | Trace:FileStat: > UTIL_stat(-1, file) 7 | Trace:FileStat: < 1 8 | Trace:FileStat: < 65537 9 | Trace:FileStat: > UTIL_stat(-1, file) 10 | Trace:FileStat: < 1 11 | Trace:FileStat: > UTIL_isDirectoryStat() 12 | Trace:FileStat: < 0 13 | Trace:FileStat: > UTIL_stat(-1, file) 14 | Trace:FileStat: < 1 15 | Trace:FileStat: > UTIL_isSameFile(file, out/file.zst) 16 | Trace:FileStat: > UTIL_stat(-1, file) 17 | Trace:FileStat: < 1 18 | Trace:FileStat: > UTIL_stat(-1, out/file.zst) 19 | Trace:FileStat: < 0 20 | Trace:FileStat: < 0 21 | Trace:FileStat: > UTIL_isRegularFile(out/file.zst) 22 | Trace:FileStat: > UTIL_stat(-1, out/file.zst) 23 | Trace:FileStat: < 0 24 | Trace:FileStat: < 0 25 | zstd: out/file.zst: Permission denied 26 | zstd: can't stat out/file.zst : Permission denied -- ignored 27 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-file-to-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen > file 6 | chmod 642 file 7 | 8 | zstd file -q --trace-file-stat -o file.zst 9 | zstd -tq file.zst 10 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-file-to-stdout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen > file 6 | 7 | zstd file -cq --trace-file-stat > file.zst 8 | zstd -tq file.zst 9 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-file-to-stdout.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | Trace:FileStat: > UTIL_isLink(file) 2 | Trace:FileStat: < 0 3 | Trace:FileStat: > UTIL_isConsole(1) 4 | Trace:FileStat: < 0 5 | Trace:FileStat: > UTIL_isConsole(2) 6 | Trace:FileStat: < 0 7 | Trace:FileStat: > UTIL_getFileSize(file) 8 | Trace:FileStat: > UTIL_stat(-1, file) 9 | Trace:FileStat: < 1 10 | Trace:FileStat: < 65537 11 | Trace:FileStat: > UTIL_stat(-1, file) 12 | Trace:FileStat: < 1 13 | Trace:FileStat: > UTIL_isDirectoryStat() 14 | Trace:FileStat: < 0 15 | Trace:FileStat: > UTIL_stat(-1, file) 16 | Trace:FileStat: < 1 17 | Trace:FileStat: > UTIL_isRegularFile(/*stdout*\) 18 | Trace:FileStat: > UTIL_stat(-1, /*stdout*\) 19 | Trace:FileStat: < 0 20 | Trace:FileStat: < 0 21 | Trace:FileStat: > UTIL_getFileSize(file) 22 | Trace:FileStat: > UTIL_stat(-1, file) 23 | Trace:FileStat: < 1 24 | Trace:FileStat: < 65537 25 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-stdin-to-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen > file 6 | 7 | zstd < file -q --trace-file-stat -o file.zst 8 | zstd -tq file.zst 9 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-stdin-to-file.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | Trace:FileStat: > UTIL_isConsole(0) 2 | Trace:FileStat: < 0 3 | Trace:FileStat: > UTIL_isConsole(2) 4 | Trace:FileStat: < 0 5 | Trace:FileStat: > UTIL_getFileSize(/*stdin*\) 6 | Trace:FileStat: > UTIL_stat(-1, /*stdin*\) 7 | Trace:FileStat: < 0 8 | Trace:FileStat: < -1 9 | Trace:FileStat: > UTIL_isSameFile(/*stdin*\, file.zst) 10 | Trace:FileStat: > UTIL_stat(-1, /*stdin*\) 11 | Trace:FileStat: < 0 12 | Trace:FileStat: < 0 13 | Trace:FileStat: > UTIL_isRegularFile(file.zst) 14 | Trace:FileStat: > UTIL_stat(-1, file.zst) 15 | Trace:FileStat: < 0 16 | Trace:FileStat: < 0 17 | Trace:FileStat: > UTIL_isRegularFile(file.zst) 18 | Trace:FileStat: > UTIL_stat(-1, file.zst) 19 | Trace:FileStat: < 1 20 | Trace:FileStat: < 1 21 | Trace:FileStat: > UTIL_getFileSize(/*stdin*\) 22 | Trace:FileStat: > UTIL_stat(-1, /*stdin*\) 23 | Trace:FileStat: < 0 24 | Trace:FileStat: < -1 25 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen > file 6 | 7 | zstd < file -cq --trace-file-stat > file.zst 8 | zstd -tq file.zst 9 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | Trace:FileStat: > UTIL_isConsole(0) 2 | Trace:FileStat: < 0 3 | Trace:FileStat: > UTIL_isConsole(1) 4 | Trace:FileStat: < 0 5 | Trace:FileStat: > UTIL_isConsole(2) 6 | Trace:FileStat: < 0 7 | Trace:FileStat: > UTIL_getFileSize(/*stdin*\) 8 | Trace:FileStat: > UTIL_stat(-1, /*stdin*\) 9 | Trace:FileStat: < 0 10 | Trace:FileStat: < -1 11 | Trace:FileStat: > UTIL_isRegularFile(/*stdout*\) 12 | Trace:FileStat: > UTIL_stat(-1, /*stdout*\) 13 | Trace:FileStat: < 0 14 | Trace:FileStat: < 0 15 | Trace:FileStat: > UTIL_getFileSize(/*stdin*\) 16 | Trace:FileStat: > UTIL_stat(-1, /*stdin*\) 17 | Trace:FileStat: < 0 18 | Trace:FileStat: < -1 19 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/decompress-file-to-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen | zstd -q > file.zst 6 | chmod 642 file.zst 7 | 8 | zstd -dq --trace-file-stat file.zst 9 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/decompress-file-to-stdout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen | zstd -q > file.zst 6 | 7 | zstd -dcq --trace-file-stat file.zst > file 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/decompress-file-to-stdout.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | Trace:FileStat: > UTIL_isLink(file.zst) 2 | Trace:FileStat: < 0 3 | Trace:FileStat: > UTIL_isConsole(1) 4 | Trace:FileStat: < 0 5 | Trace:FileStat: > UTIL_isConsole(2) 6 | Trace:FileStat: < 0 7 | Trace:FileStat: > UTIL_isDirectory(file.zst) 8 | Trace:FileStat: > UTIL_stat(-1, file.zst) 9 | Trace:FileStat: < 1 10 | Trace:FileStat: > UTIL_isDirectoryStat() 11 | Trace:FileStat: < 0 12 | Trace:FileStat: < 0 13 | Trace:FileStat: > UTIL_stat(-1, file.zst) 14 | Trace:FileStat: < 1 15 | Trace:FileStat: > UTIL_isRegularFile(/*stdout*\) 16 | Trace:FileStat: > UTIL_stat(-1, /*stdout*\) 17 | Trace:FileStat: < 0 18 | Trace:FileStat: < 0 19 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/decompress-stdin-to-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen | zstd -q > file.zst 6 | 7 | zstd -dcq --trace-file-stat < file.zst -o file 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/decompress-stdin-to-file.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | Trace:FileStat: > UTIL_isConsole(0) 2 | Trace:FileStat: < 0 3 | Trace:FileStat: > UTIL_isConsole(2) 4 | Trace:FileStat: < 0 5 | Trace:FileStat: > UTIL_isDirectory(/*stdin*\) 6 | Trace:FileStat: > UTIL_stat(-1, /*stdin*\) 7 | Trace:FileStat: < 0 8 | Trace:FileStat: < 0 9 | Trace:FileStat: > UTIL_isSameFile(/*stdin*\, file) 10 | Trace:FileStat: > UTIL_stat(-1, /*stdin*\) 11 | Trace:FileStat: < 0 12 | Trace:FileStat: < 0 13 | Trace:FileStat: > UTIL_isRegularFile(file) 14 | Trace:FileStat: > UTIL_stat(-1, file) 15 | Trace:FileStat: < 0 16 | Trace:FileStat: < 0 17 | Trace:FileStat: > UTIL_isRegularFile(file) 18 | Trace:FileStat: > UTIL_stat(-1, file) 19 | Trace:FileStat: < 1 20 | Trace:FileStat: < 1 21 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | datagen | zstd -q > file.zst 6 | 7 | zstd -dcq --trace-file-stat < file.zst > file 8 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh.stderr.exact: -------------------------------------------------------------------------------- 1 | Trace:FileStat: > UTIL_isConsole(0) 2 | Trace:FileStat: < 0 3 | Trace:FileStat: > UTIL_isConsole(1) 4 | Trace:FileStat: < 0 5 | Trace:FileStat: > UTIL_isConsole(2) 6 | Trace:FileStat: < 0 7 | Trace:FileStat: > UTIL_isDirectory(/*stdin*\) 8 | Trace:FileStat: > UTIL_stat(-1, /*stdin*\) 9 | Trace:FileStat: < 0 10 | Trace:FileStat: < 0 11 | Trace:FileStat: > UTIL_isRegularFile(/*stdout*\) 12 | Trace:FileStat: > UTIL_stat(-1, /*stdout*\) 13 | Trace:FileStat: < 0 14 | Trace:FileStat: < 0 15 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/progress/no-progress.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #!/bin/sh 4 | 5 | . "$COMMON/platform.sh" 6 | 7 | set -e 8 | 9 | echo hello > hello 10 | echo world > world 11 | 12 | zstd -q hello world 13 | 14 | println >&2 "Tests cases where progress information should not be printed" 15 | 16 | for args in \ 17 | "" \ 18 | "--fake-stderr-is-console -q" \ 19 | "--fake-stderr-is-console -qq --progress" \ 20 | "--no-progress --fake-stderr-is-console" \ 21 | "--no-progress --fake-stderr-is-console -v" 22 | do 23 | println >&2 "args = $args" 24 | println >&2 "compress file to file" 25 | zstd $args -f hello 26 | println >&2 "compress pipe to pipe" 27 | zstd $args < hello > $INTOVOID 28 | println >&2 "compress pipe to file" 29 | zstd $args < hello -fo hello.zst 30 | println >&2 "compress file to pipe" 31 | zstd $args hello -c > $INTOVOID 32 | println >&2 "compress 2 files" 33 | zstd $args -f hello world 34 | 35 | println >&2 "decompress file to file" 36 | zstd $args -d -f hello.zst 37 | println >&2 "decompress pipe to pipe" 38 | zstd $args -d < hello.zst > $INTOVOID 39 | println >&2 "decompress pipe to file" 40 | zstd $args -d < hello.zst -fo hello 41 | println >&2 "decompress file to pipe" 42 | zstd $args -d hello.zst -c > $INTOVOID 43 | println >&2 "decompress 2 files" 44 | zstd $args -d -f hello.zst world.zst 45 | println >&2 "" 46 | done 47 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/progress/progress.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | . "$COMMON/platform.sh" 4 | 5 | set -e 6 | 7 | println >&2 "Tests cases where progress information should be printed" 8 | 9 | echo hello > hello 10 | echo world > world 11 | 12 | zstd -q hello world 13 | 14 | for args in \ 15 | "--progress" \ 16 | "--fake-stderr-is-console" \ 17 | "--progress --fake-stderr-is-console -q"; do 18 | println >&2 "args = $args" 19 | println >&2 "compress file to file" 20 | zstd $args -f hello 21 | println >&2 "compress pipe to pipe" 22 | zstd $args < hello > $INTOVOID 23 | println >&2 "compress pipe to file" 24 | zstd $args < hello -fo hello.zst 25 | println >&2 "compress file to pipe" 26 | zstd $args hello -c > $INTOVOID 27 | println >&2 "compress 2 files" 28 | zstd $args -f hello world 29 | 30 | println >&2 "decompress file to file" 31 | zstd $args -d -f hello.zst 32 | println >&2 "decompress pipe to pipe" 33 | zstd $args -d < hello.zst > $INTOVOID 34 | println >&2 "decompress pipe to file" 35 | zstd $args -d < hello.zst -fo hello 36 | println >&2 "decompress file to pipe" 37 | zstd $args -d hello.zst -c > $INTOVOID 38 | println >&2 "decompress 2 files" 39 | zstd $args -d -f hello.zst world.zst 40 | println >&2 "" 41 | done 42 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/zstd-symlinks/setup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | println "hello" > hello 5 | println "world" > world 6 | zstd hello world 7 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/zstd-symlinks/zstdcat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Test zstdcat symlink in bin/ 5 | zstdcat hello.zst 6 | zstdcat hello.zst world 7 | zstdcat hello world.zst 8 | zstdcat hello.zst world.zst 9 | 10 | # Test local zstdcat symlink 11 | ln -s $(which zstd) ./zstdcat 12 | ./zstdcat hello.zst 13 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/cli-tests/zstd-symlinks/zstdcat.sh.stdout.exact: -------------------------------------------------------------------------------- 1 | hello 2 | hello 3 | world 4 | hello 5 | world 6 | hello 7 | world 8 | hello 9 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/dict-files/zero-weight-dict: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/dict-files/zero-weight-dict -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/external_matchfinder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Yann Collet, Meta Platforms, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | #ifndef EXTERNAL_MATCHFINDER 12 | #define EXTERNAL_MATCHFINDER 13 | 14 | #define ZSTD_STATIC_LINKING_ONLY 15 | #include "zstd.h" 16 | 17 | /* See external_matchfinder.c for details on each test case */ 18 | typedef enum { 19 | EMF_ZERO_SEQS = 0, 20 | EMF_ONE_BIG_SEQ = 1, 21 | EMF_LOTS_OF_SEQS = 2, 22 | EMF_BIG_ERROR = 3, 23 | EMF_SMALL_ERROR = 4, 24 | EMF_INVALID_OFFSET = 5, 25 | EMF_INVALID_MATCHLEN = 6, 26 | EMF_INVALID_LITLEN = 7, 27 | EMF_INVALID_LAST_LITS = 8 28 | } EMF_testCase; 29 | 30 | size_t zstreamSequenceProducer( 31 | void* sequenceProducerState, 32 | ZSTD_Sequence* outSeqs, size_t outSeqsCapacity, 33 | const void* src, size_t srcSize, 34 | const void* dict, size_t dictSize, 35 | int compressionLevel, 36 | size_t windowSize 37 | ); 38 | 39 | #endif /* EXTERNAL_MATCHFINDER */ 40 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/fuzz/.gitignore: -------------------------------------------------------------------------------- 1 | # test artefacts 2 | corpora 3 | block_decompress 4 | block_round_trip 5 | dictionary_decompress 6 | dictionary_loader 7 | dictionary_round_trip 8 | dictionary_stream_round_trip 9 | raw_dictionary_round_trip 10 | simple_compress 11 | simple_decompress 12 | simple_round_trip 13 | stream_decompress 14 | stream_round_trip 15 | zstd_frame_info 16 | decompress_dstSize_tooSmall 17 | fse_read_ncount 18 | sequence_compression_api 19 | seekable_roundtrip 20 | huf_decompress 21 | huf_round_trip 22 | fuzz-*.log 23 | rt_lib_* 24 | d_lib_* 25 | crash-* 26 | 27 | # misc 28 | trace 29 | tmp* 30 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/fuzz/seq_prod_fuzz_example/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright (c) Yann Collet, Meta Platforms, Inc. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under both the BSD-style license (found in the 5 | # LICENSE file in the root directory of this source tree) and the GPLv2 (found 6 | # in the COPYING file in the root directory of this source tree). 7 | # You may select, at your option, one of the above-listed licenses. 8 | 9 | CC = clang 10 | CFLAGS = -g -fno-omit-frame-pointer -fsanitize=undefined,address,fuzzer -I../ -I../../../lib/ 11 | 12 | .PHONY: default 13 | default: example_seq_prod.o 14 | 15 | example_seq_prod.o: example_seq_prod.c 16 | $(CC) -c $(CFLAGS) $^ -o $@ 17 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/fuzz/seq_prod_fuzz_example/README.md: -------------------------------------------------------------------------------- 1 | # Fuzzing a Custom Sequence Producer Plugin 2 | This directory contains example code for using a custom sequence producer in the zstd fuzzers. 3 | 4 | You can build and run the code in this directory using these commands: 5 | ``` 6 | $ make corpora 7 | $ make -C seq_prod_fuzz_example/ 8 | $ python3 ./fuzz.py build all --enable-fuzzer --enable-asan --enable-ubsan --cc clang --cxx clang++ --custom-seq-prod=seq_prod_fuzz_example/example_seq_prod.o 9 | $ python3 ./fuzz.py libfuzzer simple_round_trip 10 | ``` 11 | 12 | See `../fuzz_third_party_seq_prod.h` and `../README.md` for more information on zstd fuzzing. 13 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-compression/PR-3517-block-splitter-corruption-test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-compression/PR-3517-block-splitter-corruption-test -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-compression/http: -------------------------------------------------------------------------------- 1 | ads60.vertamedia.comhttp://ads60.vertamedia.com/ops/43C53990160C658B/46991http://ads60.vertamedia.com/ve/43C53990160C658B/53http://ads60.vertamedia.com/ve/43C53990160C658B/54http://ads60.vertamedia.com/ve/43C53990160C658B/55http://ads60.vertamedia.com/ve/43C53990160C658B/56http://ads60.vertamedia.com/ve/43C53990160C658B/57http://ads60.vertamedia.com/ve/43C53990160C658B/66http://ads60.vertamedia.com/ve/43C53990160C658B/71 -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-compression/huffman-compressed-larger: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-compression/huffman-compressed-larger -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-compression/large-literal-and-match-lengths: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-compression/large-literal-and-match-lengths -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression-errors/.gitignore: -------------------------------------------------------------------------------- 1 | !*.zst 2 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression-errors/off0.bin.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression-errors/off0.bin.zst -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression-errors/zeroSeq_extraneous.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression-errors/zeroSeq_extraneous.zst -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression/block-128k.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression/block-128k.zst -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression/empty-block.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression/empty-block.zst -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression/rle-first-block.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression/rle-first-block.zst -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression/zeroSeq_2B.zst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-decompression/zeroSeq_2B.zst -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/golden-dictionaries/http-dict-missing-symbols: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/golden-dictionaries/http-dict-missing-symbols -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/helin-segv.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Before gzip-1.4, gzip -d would segfault on some inputs. 3 | 4 | # Copyright (C) 2010-2016 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # limit so don't run it by default. 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ . 21 | 22 | # This test case was provided by Aki Helin. 23 | printf '\037\235\220\0\0\0\304' > helin.gz || framework_failure_ 24 | printf '\0\0' > exp || framework_failure_ 25 | 26 | fail=0 27 | 28 | gzip -dc helin.gz > out || fail=1 29 | compare exp out || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/hufts-segv.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/libretro/neocd_libretro/5eca2c8fd567b5261251c65ecafa8cf5b179d1d2/deps/libchdr/deps/zstd-1.5.6/tests/gzip/hufts-segv.gz -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/hufts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Exercise a bug whereby an invalid input could make gzip -d misbehave. 3 | 4 | # Copyright (C) 2009-2016 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # limit so don't run it by default. 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ . 21 | 22 | printf '\n...: invalid compressed data--format violated\n' > exp \ 23 | || framework_failure_ 24 | 25 | fail=0 26 | gzip -dc "$abs_srcdir/hufts-segv.gz" > out 2> err 27 | test $? = 1 || fail=1 28 | 29 | compare /dev/null out || fail=1 30 | 31 | sed 's/.*hufts-segv.gz: /...: /' err > k; mv k err || fail=1 32 | compare exp err || fail=1 33 | 34 | Exit $fail 35 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/init.cfg: -------------------------------------------------------------------------------- 1 | # This file is sourced by init.sh, *before* its initialization. 2 | 3 | # This goes hand in hand with the "exec 9>&2;" in Makefile.am's 4 | # TESTS_ENVIRONMENT definition. 5 | stderr_fileno_=9 6 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/list.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Exercise the --list option. 3 | 4 | # Copyright 2016 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # limit so don't run it by default. 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ . 21 | 22 | echo zoology zucchini > in || framework_failure_ 23 | cp in orig || framework_failure_ 24 | 25 | gzip -l in && fail=1 26 | gzip -9 in || fail=1 27 | gzip -l in.gz >out1 || fail=1 28 | gzip -l in.gz | cat >out2 || fail=1 29 | compare out1 out2 || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/memcpy-abuse.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Before gzip-1.4, this the use of memcpy in inflate_codes could 3 | # mistakenly operate on overlapping regions. Exercise that code. 4 | 5 | # Copyright (C) 2010-2016 Free Software Foundation, Inc. 6 | 7 | # This program is free software: you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation, either version 3 of the License, or 10 | # (at your option) any later version. 11 | 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | # limit so don't run it by default. 20 | 21 | . "${srcdir=.}/init.sh"; path_prepend_ . 22 | 23 | # The input must be larger than 32KiB and slightly 24 | # less uniform than e.g., all zeros. 25 | printf wxy%032767d 0 | tee in | gzip > in.gz || framework_failure_ 26 | 27 | fail=0 28 | 29 | # Before the fix, this would call memcpy with overlapping regions. 30 | gzip -dc in.gz > out || fail=1 31 | 32 | compare in out || fail=1 33 | 34 | Exit $fail 35 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/null-suffix-clobber.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Before gzip-1.5, gzip -d -S '' k.gz would delete F.gz and not create "F" 3 | 4 | # Copyright (C) 2010-2016 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # limit so don't run it by default. 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ . 21 | 22 | printf anything | gzip > F.gz || framework_failure_ 23 | echo y > yes || framework_failure_ 24 | echo "gzip: invalid suffix ''" > expected-err || framework_failure_ 25 | 26 | fail=0 27 | 28 | gzip ---presume-input-tty -d -S '' F.gz < yes > out 2>err && fail=1 29 | 30 | compare /dev/null out || fail=1 31 | compare expected-err err || fail=1 32 | 33 | test -f F.gz || fail=1 34 | 35 | Exit $fail 36 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/stdin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Ensure that gzip interprets "-" as stdin. 3 | 4 | # Copyright (C) 2009-2016 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # limit so don't run it by default. 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ . 21 | 22 | printf a | gzip > in || framework_failure_ 23 | printf aaa > exp || framework_failure_ 24 | 25 | fail=0 26 | gzip -dc in - in < in > out 2>err || fail=1 27 | 28 | compare exp out || fail=1 29 | compare /dev/null err || fail=1 30 | 31 | Exit $fail 32 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/gzip/z-suffix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Check that -Sz works. 3 | 4 | # Copyright 2014-2016 Free Software Foundation, Inc. 5 | 6 | # This program is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # limit so don't run it by default. 19 | 20 | . "${srcdir=.}/init.sh"; path_prepend_ . 21 | 22 | printf anything > F && cp F G || framework_failure_ 23 | gzip -Sz F || fail=1 24 | test ! -f F || fail=1 25 | test -f Fz || fail=1 26 | gzip -dSz F || fail=1 27 | test ! -f Fz || fail=1 28 | compare F G || fail\1 29 | 30 | Exit $fail 31 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/loremOut.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | /* LOREM_genOut(): 12 | * Generate @size bytes of compressible data using lorem ipsum generator into 13 | * stdout. 14 | */ 15 | void LOREM_genOut(unsigned long long size, unsigned seed); 16 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/regression/.gitignore: -------------------------------------------------------------------------------- 1 | # regression test artifacts 2 | data-cache 3 | cache 4 | test 5 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/regression/README.md: -------------------------------------------------------------------------------- 1 | # Regression tests 2 | 3 | The regression tests run zstd in many scenarios and ensures that the size of the compressed results doesn't change. This helps us ensure that we don't accidentally regress zstd's compression ratio. 4 | 5 | These tests get run every night by CircleCI. If the job fails you can read the diff printed by the job to ensure the change isn't a regression. If all is well you can download the `results.csv` artifact and commit the new results. Or you can rebuild it yourself following the instructions below. 6 | 7 | ## Rebuilding results.csv 8 | 9 | From the root of the zstd repo run: 10 | 11 | ``` 12 | # Build the zstd binary 13 | make clean 14 | make -j zstd 15 | 16 | # Build the regression test binary 17 | cd tests/regression 18 | make clean 19 | make -j test 20 | 21 | # Run the regression test 22 | ./test --cache data-cache --zstd ../../zstd --output results.csv 23 | 24 | # Check results.csv to ensure the new results are okay 25 | git diff 26 | 27 | # Then submit the PR 28 | ``` 29 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/tests/regression/result.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under both the BSD-style license (found in the 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7 | * in the COPYING file in the root directory of this source tree). 8 | * You may select, at your option, one of the above-listed licenses. 9 | */ 10 | 11 | #include "result.h" 12 | 13 | char const* result_get_error_string(result_t result) { 14 | switch (result_get_error(result)) { 15 | case result_error_ok: 16 | return "okay"; 17 | case result_error_skip: 18 | return "skip"; 19 | case result_error_system_error: 20 | return "system error"; 21 | case result_error_compression_error: 22 | return "compression error"; 23 | case result_error_decompression_error: 24 | return "decompression error"; 25 | case result_error_round_trip_error: 26 | return "round trip error"; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/zlibWrapper/.gitignore: -------------------------------------------------------------------------------- 1 | # object artifacts 2 | *.o 3 | 4 | # Default result files 5 | _* 6 | example 7 | example_zstd.* 8 | example_gz.* 9 | fitblk 10 | fitblk_zstd.* 11 | zwrapbench 12 | foo.gz 13 | 14 | minigzip 15 | minigzip_zstd 16 | example 17 | example_zstd 18 | fitblk 19 | fitblk_zstd 20 | zwrapbench 21 | 22 | # Misc files 23 | *.bat 24 | *.zip 25 | *.txt 26 | 27 | # Directories 28 | minizip/ 29 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/zlibWrapper/BUCK: -------------------------------------------------------------------------------- 1 | cxx_library( 2 | name='zlib_wrapper', 3 | visibility=['PUBLIC'], 4 | exported_linker_flags=['-lz'], 5 | header_namespace='', 6 | exported_headers=['zstd_zlibwrapper.h'], 7 | headers=[ 8 | 'gzcompatibility.h', 9 | 'gzguts.h', 10 | ], 11 | srcs=glob(['*.c']), 12 | deps=[ 13 | '//lib:zstd', 14 | '//lib:zstd_common', 15 | ], 16 | ) 17 | 18 | cxx_binary( 19 | name='minigzip', 20 | srcs=['examples/minigzip.c'], 21 | deps=[':zlib_wrapper'], 22 | ) 23 | -------------------------------------------------------------------------------- /deps/libchdr/deps/zstd-1.5.6/zlibWrapper/gzclose.c: -------------------------------------------------------------------------------- 1 | /* gzclose.c contains minimal changes required to be compiled with zlibWrapper: 2 | * - gz_statep was converted to union to work with -Wstrict-aliasing=1 */ 3 | 4 | /* gzclose.c -- zlib gzclose() function 5 | * Copyright (C) 2004, 2010 Mark Adler 6 | * For conditions of distribution and use, see https://www.zlib.net/zlib_license.html 7 | */ 8 | 9 | #include "gzguts.h" 10 | 11 | /* gzclose() is in a separate file so that it is linked in only if it is used. 12 | That way the other gzclose functions can be used instead to avoid linking in 13 | unneeded compression or decompression routines. */ 14 | int ZEXPORT gzclose(gzFile file) { 15 | #ifndef NO_GZCOMPRESS 16 | gz_statep state; 17 | 18 | if (file == NULL) 19 | return Z_STREAM_ERROR; 20 | state.file = file; 21 | 22 | return state.state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); 23 | #else 24 | return gzclose_r(file); 25 | #endif 26 | } 27 | -------------------------------------------------------------------------------- /deps/libchdr/include/libchdr/chdconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef __CHDCONFIG_H__ 2 | #define __CHDCONFIG_H__ 3 | 4 | /* Configure CHDR features here */ 5 | #define WANT_RAW_DATA_SECTOR 1 6 | #define WANT_SUBCODE 1 7 | //#define NEED_CACHE_HUNK 1 8 | #define VERIFY_BLOCK_CRC 1 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /deps/libretro-common/crt/include/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __LIBRETRO_SDK_CRT_STRING_H_ 2 | #define __LIBRETRO_SDK_CRT_STRING_H_ 3 | 4 | #include 5 | 6 | void *memcpy(void *dst, const void *src, size_t len); 7 | 8 | void *memset(void *b, int c, size_t len); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /deps/libretro-common/crt/string.c: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #include 3 | #endif 4 | #include 5 | #include 6 | 7 | void *memset(void *dst, int val, size_t count) 8 | { 9 | void *start = dst; 10 | 11 | #if defined(_M_IA64) || defined (_M_AMD64) || defined(_M_ALPHA) || defined (_M_PPC) 12 | extern void RtlFillMemory(void *, size_t count, char); 13 | 14 | RtlFillMemory(dst, count, (char)val); 15 | #else 16 | while (count--) 17 | { 18 | *(char*)dst = (char)val; 19 | dst = (char*)dst + 1; 20 | } 21 | #endif 22 | 23 | return start; 24 | } 25 | 26 | void *memcpy(void *dst, const void *src, size_t len) 27 | { 28 | size_t i; 29 | 30 | for (i = 0; i < len; i++) 31 | ((unsigned char *)dst)[i] = ((unsigned char *)src)[i]; 32 | 33 | return dst; 34 | } 35 | -------------------------------------------------------------------------------- /deps/libretro-common/include/encodings/base64.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBRETRO_ENCODINGS_BASE64_H 2 | #define _LIBRETRO_ENCODINGS_BASE64_H 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | RETRO_BEGIN_DECLS 10 | 11 | char* base64(const void* binaryData, int len, int *flen); 12 | unsigned char* unbase64(const char* ascii, int len, int *flen); 13 | 14 | RETRO_END_DECLS 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /deps/libvorbis/lib/lookup.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * 9 | * by the Xiph.Org Foundation https://xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: lookup based functions 14 | 15 | ********************************************************************/ 16 | 17 | #ifndef _V_LOOKUP_H_ 18 | 19 | #ifdef FLOAT_LOOKUP 20 | extern float vorbis_coslook(float a); 21 | extern float vorbis_invsqlook(float a); 22 | extern float vorbis_invsq2explook(int a); 23 | extern float vorbis_fromdBlook(float a); 24 | #endif 25 | #ifdef INT_LOOKUP 26 | extern long vorbis_invsqlook_i(long a,long e); 27 | extern long vorbis_coslook_i(long a); 28 | extern float vorbis_fromdBlook_i(long a); 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /deps/libvorbis/lib/lpc.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * 9 | * by the Xiph.Org Foundation https://xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: LPC low level routines 14 | 15 | ********************************************************************/ 16 | 17 | #ifndef _V_LPC_H_ 18 | #define _V_LPC_H_ 19 | 20 | #include "vorbis/codec.h" 21 | 22 | /* simple linear scale LPC code */ 23 | extern float vorbis_lpc_from_data(float *data,float *lpc,int n,int m); 24 | 25 | extern void vorbis_lpc_predict(float *coeff,float *prime,int m, 26 | float *data,long n); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/libvorbis/lib/lsp.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * 9 | * by the Xiph.Org Foundation https://xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: LSP (also called LSF) conversion routines 14 | 15 | ********************************************************************/ 16 | 17 | 18 | #ifndef _V_LSP_H_ 19 | #define _V_LSP_H_ 20 | 21 | extern int vorbis_lpc_to_lsp(float *lpc,float *lsp,int m); 22 | 23 | extern void vorbis_lsp_to_curve(float *curve,int *map,int n,int ln, 24 | float *lsp,int m, 25 | float amp,float ampoffset); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /deps/libvorbis/lib/registry.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * 9 | * by the Xiph.Org Foundation https://xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: registry for time, floor, res backends and channel mappings 14 | 15 | ********************************************************************/ 16 | 17 | #ifndef _V_REG_H_ 18 | #define _V_REG_H_ 19 | 20 | #define VI_TRANSFORMB 1 21 | #define VI_WINDOWB 1 22 | #define VI_TIMEB 1 23 | #define VI_FLOORB 2 24 | #define VI_RESB 3 25 | #define VI_MAPB 1 26 | 27 | extern const vorbis_func_floor *const _floor_P[]; 28 | extern const vorbis_func_residue *const _residue_P[]; 29 | extern const vorbis_func_mapping *const _mapping_P[]; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /deps/libvorbis/lib/smallft.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * 9 | * by the Xiph.Org Foundation https://xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: fft transform 14 | 15 | ********************************************************************/ 16 | 17 | #ifndef _V_SMFT_H_ 18 | #define _V_SMFT_H_ 19 | 20 | #include "vorbis/codec.h" 21 | 22 | typedef struct { 23 | int n; 24 | float *trigcache; 25 | int *splitcache; 26 | } drft_lookup; 27 | 28 | extern void drft_forward(drft_lookup *l,float *data); 29 | extern void drft_backward(drft_lookup *l,float *data); 30 | extern void drft_init(drft_lookup *l,int n); 31 | extern void drft_clear(drft_lookup *l); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /deps/libvorbis/lib/window.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * * 3 | * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * 4 | * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 5 | * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 6 | * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 7 | * * 8 | * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007 * 9 | * by the Xiph.Org Foundation https://xiph.org/ * 10 | * * 11 | ******************************************************************** 12 | 13 | function: window functions 14 | 15 | ********************************************************************/ 16 | 17 | #ifndef _V_WINDOW_ 18 | #define _V_WINDOW_ 19 | 20 | extern const float *_vorbis_window_get(int n); 21 | extern void _vorbis_apply_window(float *d,int *winno,long *blocksizes, 22 | int lW,int W,int nW); 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | CORE_DIR := $(LOCAL_PATH)/.. 4 | 5 | include $(CORE_DIR)/Makefile.common 6 | 7 | COREFLAGS := -DINLINE=inline -D__LIBRETRO__ 8 | COREFLAGS += -DHAVE_CHD -DUSE_FILE32API -DHAVE_ZLIB -DZ7_ST -DZSTD_DISABLE_ASM 9 | COREFLAGS += -DHAVE_FLAC -DFLAC__HAS_OGG=0 -DFLAC_API_EXPORTS -DFLAC__NO_DLL 10 | COREFLAGS += -DHAVE_LROUND -DHAVE_STDINT_H -DHAVE_STDLIB_H -DHAVE_SYS_PARAM_H 11 | 12 | GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" 13 | ifneq ($(GIT_VERSION)," unknown") 14 | COREFLAGS += -DGIT_VERSION=\"$(GIT_VERSION)\" 15 | endif 16 | 17 | include $(CLEAR_VARS) 18 | LOCAL_MODULE := retro 19 | LOCAL_SRC_FILES := $(SOURCES_CXX) $(SOURCES_C) 20 | LOCAL_CXXFLAGS := -fomit-frame-pointer -std=c++11 -fno-exceptions -fno-rtti $(COREFLAGS) $(INCFLAGS) 21 | LOCAL_CFLAGS := -fomit-frame-pointer $(COREFLAGS) $(INCFLAGS) 22 | LOCAL_LDFLAGS := -Wl,-version-script=$(CORE_DIR)/link.T 23 | LOCAL_LDLIBS := -lz 24 | LOCAL_ARM_MODE := arm 25 | include $(BUILD_SHARED_LIBRARY) 26 | -------------------------------------------------------------------------------- /jni/Application.mk: -------------------------------------------------------------------------------- 1 | APP_STL := c++_static 2 | APP_ABI := all 3 | APP_PLATFORM := android-19 4 | -------------------------------------------------------------------------------- /link.T: -------------------------------------------------------------------------------- 1 | { 2 | global: retro_*; 3 | local: *; 4 | }; 5 | 6 | -------------------------------------------------------------------------------- /src/3rdparty/musashi/m68kops.h: -------------------------------------------------------------------------------- 1 | #ifndef M68KOPS__HEADER 2 | #define M68KOPS__HEADER 3 | 4 | /* ======================================================================== */ 5 | /* ============================ OPCODE HANDLERS =========================== */ 6 | /* ======================================================================== */ 7 | 8 | 9 | /* Build the opcode handler table */ 10 | void m68ki_build_opcode_table(void); 11 | 12 | extern void (*m68ki_instruction_jump_table[0x10000])(void); /* opcode handler jump table */ 13 | extern unsigned char m68ki_cycles[][0x10000]; 14 | 15 | 16 | /* ======================================================================== */ 17 | /* ============================== END OF FILE ============================= */ 18 | /* ======================================================================== */ 19 | 20 | #endif /* M68KOPS__HEADER */ 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/3rdparty/z80/z80daisy.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | 3 | z80daisy.h 4 | 5 | Z80/180 daisy chaining support functions. 6 | 7 | ***************************************************************************/ 8 | 9 | 10 | #ifndef Z80DAISY_H 11 | #define Z80DAISY_H 12 | 13 | 14 | /* daisy-chain link */ 15 | struct z80_irq_daisy_chain 16 | { 17 | void (*reset)(int); /* reset callback */ 18 | int (*irq_state)(int); /* get interrupt state */ 19 | int (*irq_ack)(int); /* interrupt acknowledge callback */ 20 | void (*irq_reti)(int); /* reti callback */ 21 | int param; /* callback parameter (-1 ends list) */ 22 | }; 23 | 24 | 25 | /* these constants are returned from the irq_state function */ 26 | #define Z80_DAISY_INT 0x01 /* interrupt request mask */ 27 | #define Z80_DAISY_IEO 0x02 /* interrupt disable mask (IEO) */ 28 | 29 | 30 | /* prototypes */ 31 | void z80daisy_reset(const struct z80_irq_daisy_chain *daisy); 32 | int z80daisy_update_irq_state(const struct z80_irq_daisy_chain *chain); 33 | int z80daisy_call_ack_device(const struct z80_irq_daisy_chain *chain); 34 | void z80daisy_call_reti_device(const struct z80_irq_daisy_chain *chain); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/abstractfile.h: -------------------------------------------------------------------------------- 1 | #ifndef ABSTRACTFILE_H 2 | #define ABSTRACTFILE_H 1 3 | 4 | #include 5 | #include 6 | 7 | class AbstractFile 8 | { 9 | public: 10 | virtual ~AbstractFile() { }; 11 | 12 | virtual bool open(const std::string& filename) = 0; 13 | 14 | virtual bool isOpen() const = 0; 15 | 16 | virtual bool isChd() const = 0; 17 | 18 | virtual void close() = 0; 19 | 20 | virtual size_t size() const = 0; 21 | 22 | virtual int64_t pos() const = 0; 23 | 24 | virtual bool seek(size_t pos) = 0; 25 | 26 | virtual bool skip(size_t off) = 0; 27 | 28 | virtual bool eof() const = 0; 29 | 30 | virtual size_t readData(void* data, size_t size) = 0; 31 | 32 | virtual size_t readAudio(void* data, size_t size) = 0; 33 | 34 | virtual std::string readLine() = 0; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /src/archive.h: -------------------------------------------------------------------------------- 1 | #ifndef ARCHIVE_H 2 | #define ARCHIVE_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Archive 9 | { 10 | enum Type 11 | { 12 | TypeUnknown, 13 | TypeZip 14 | }; 15 | 16 | std::vector getFileList(const std::string& archiveFilename); 17 | 18 | bool readFile(const std::string& path, void* buffer, size_t maximumSize, size_t* reallyRead); 19 | int64_t getFileSize(const std::string& path); 20 | }; 21 | 22 | #endif // ARCHIVE_H 23 | -------------------------------------------------------------------------------- /src/archivezip.h: -------------------------------------------------------------------------------- 1 | #ifndef ARCHIVEZIP_H 2 | #define ARCHIVEZIP_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace ArchiveZip 9 | { 10 | std::vector getFileList(const std::string& archiveFilename); 11 | 12 | bool readFile(const std::string &archive, const std::string &filename, void *buffer, size_t maximumSize, size_t *reallyRead); 13 | int64_t getFileSize(const std::string &archive, const std::string &filename); 14 | }; 15 | 16 | #endif // ARCHIVEZIP_H 17 | -------------------------------------------------------------------------------- /src/cdromcontroller.h: -------------------------------------------------------------------------------- 1 | #ifndef CDROMCONTROLLER_H 2 | #define CDROMCONTROLLER_H 3 | 4 | #include 5 | 6 | class CdromController 7 | { 8 | public: 9 | enum Status 10 | { 11 | CdIdle = 0x00, 12 | CdPlaying = 0x10, 13 | CdSeeking = 0x20, 14 | CdScanning = 0x30, 15 | CdPaused = 0x40, 16 | CdStopped = 0x90, 17 | CdEndOfDisc = 0xC0 18 | }; 19 | 20 | static const uint32_t SCAN_SPEED = 30; 21 | 22 | CdromController(); 23 | 24 | void reset(); 25 | 26 | void processCdCommand(); 27 | 28 | // Variables to save in savestate 29 | uint8_t status; 30 | // End variables to save in savestate 31 | }; 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /src/clamp.h: -------------------------------------------------------------------------------- 1 | #ifndef CLAMP_H 2 | #define CLAMP_H 3 | 4 | #include 5 | 6 | // If clamp is not available in the standard library, provide a reasonable implementation 7 | #ifndef __cpp_lib_clamp 8 | namespace std 9 | { 10 | template 11 | constexpr const T& clamp(const T& val, const T& min, const T& max) 12 | { 13 | return std::max(min, std::min(max, val)); 14 | } 15 | } 16 | #endif 17 | 18 | #endif // CLAMP_H 19 | -------------------------------------------------------------------------------- /src/file.h: -------------------------------------------------------------------------------- 1 | #ifndef FILE_H 2 | #define FILE_H 1 3 | 4 | #include 5 | 6 | #include "abstractfile.h" 7 | 8 | class File : public AbstractFile 9 | { 10 | public: 11 | explicit File(); 12 | virtual ~File() override; 13 | 14 | bool open(const std::string& filename) override; 15 | 16 | bool isOpen() const override; 17 | 18 | bool isChd() const override; 19 | 20 | void close() override; 21 | 22 | size_t size() const override; 23 | 24 | int64_t pos() const override; 25 | 26 | bool seek(size_t pos) override; 27 | 28 | bool skip(size_t off) override; 29 | 30 | bool eof() const override; 31 | 32 | size_t readData(void* data, size_t size) override; 33 | 34 | size_t readAudio(void* data, size_t size) override; 35 | 36 | std::string readLine() override; 37 | 38 | protected: 39 | RFILE* m_stream; 40 | size_t m_fileSize; 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/flacfile.h: -------------------------------------------------------------------------------- 1 | #ifndef FLACFILE_H 2 | #define FLACFILE_H 3 | 4 | #include 5 | 6 | #include "abstractfile.h" 7 | #include "dr_libs/dr_flac.h" 8 | 9 | class FlacFile 10 | { 11 | public: 12 | FlacFile(); 13 | ~FlacFile(); 14 | 15 | // Non copyable 16 | FlacFile(const FlacFile&) = delete; 17 | 18 | // Non copyable 19 | FlacFile& operator=(const FlacFile&) = delete; 20 | 21 | bool initialize(AbstractFile* file); 22 | 23 | size_t read(char *data, size_t size); 24 | 25 | bool seek(size_t position); 26 | 27 | size_t length(); 28 | 29 | void cleanup(); 30 | 31 | // Declare all callbacks as friends so they can modify the internals 32 | friend size_t drflac_read_cb(void* pUserData, void* pBufferOut, size_t bytesToRead); 33 | friend drflac_bool32 drflac_seek_cb(void* pUserData, int offset, drflac_seek_origin origin); 34 | 35 | protected: 36 | size_t readRemainder(char *data, size_t size); 37 | void clearRemainder(); 38 | 39 | AbstractFile* m_file; 40 | drflac* m_flac; 41 | std::array m_remainder; 42 | int m_remainderPos; 43 | }; 44 | 45 | #endif // FLACFILE_H 46 | -------------------------------------------------------------------------------- /src/inline.h: -------------------------------------------------------------------------------- 1 | #ifndef INLINE_H 2 | #define INLINE_H 3 | 4 | #include 5 | 6 | #if defined(_WIN32) || defined(__INTEL_COMPILER) 7 | #define STATIC_INLINE static __inline 8 | #elif defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L 9 | #define STATIC_INLINE static inline 10 | #elif defined(__GNUC__) 11 | #define STATIC_INLINE static __inline__ 12 | #else 13 | #define STATIC_INLINE 14 | #endif 15 | 16 | #if defined(__has_attribute) 17 | #if __has_attribute(always_inline) 18 | #define ALWAYS_INLINE __attribute__((always_inline)) 19 | #else 20 | #define ALWAYS_INLINE 21 | #endif 22 | #else 23 | #define ALWAYS_INLINE 24 | #endif 25 | 26 | #endif // INLINE_H 27 | -------------------------------------------------------------------------------- /src/input.cpp: -------------------------------------------------------------------------------- 1 | #include "input.h" 2 | 3 | Input::Input() : 4 | input1(0xFF), 5 | input2(0xFF), 6 | input3(0x0F), 7 | selector(0) 8 | { 9 | reset(); 10 | } 11 | 12 | void Input::reset() 13 | { 14 | input1 = 0xFF; 15 | input2 = 0xFF; 16 | input3 = 0x0F; 17 | selector = 0; 18 | } 19 | 20 | void Input::setInput(uint8_t new1, uint8_t new2, uint8_t new3) 21 | { 22 | input1 = new1; 23 | input2 = new2; 24 | input3 = new3 & 0x0F; 25 | } 26 | -------------------------------------------------------------------------------- /src/input.h: -------------------------------------------------------------------------------- 1 | #ifndef INPUT_H 2 | #define INPUT_H 3 | 4 | #include 5 | 6 | class Input 7 | { 8 | public: 9 | enum ControllerState { 10 | Up = 0x01, 11 | Down = 0x02, 12 | Left = 0x04, 13 | Right = 0x08, 14 | A = 0x10, 15 | B = 0x20, 16 | C = 0x40, 17 | D = 0x80, 18 | Controller1Start = 0x01, 19 | Controller1Select = 0x02, 20 | Controller2Start = 0x04, 21 | Controller2Select = 0x08 22 | }; 23 | 24 | Input(); 25 | 26 | void reset(); 27 | 28 | void setInput(uint8_t new1, uint8_t new2, uint8_t new3); 29 | 30 | uint8_t input1; 31 | uint8_t input2; 32 | uint8_t input3; 33 | uint8_t selector; 34 | }; 35 | 36 | #endif // INPUT_H 37 | -------------------------------------------------------------------------------- /src/libretro_backupram.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "libretro_backupram.h" 5 | #include "libretro_common.h" 6 | #include "libretro.h" 7 | #include "memory.h" 8 | #include "neogeocd.h" 9 | #include "path.h" 10 | 11 | void Libretro::BackupRam::setFilename(const char* content_path) 12 | { 13 | globals.srmFilename = make_srm_path(globals.perContentSaves, content_path); 14 | } 15 | 16 | void Libretro::BackupRam::load() 17 | { 18 | RFILE* file = filestream_open(globals.srmFilename.c_str(), RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE); 19 | if (!file) 20 | return; 21 | 22 | filestream_read(file, neocd->memory.backupRam, Memory::BACKUPRAM_SIZE); 23 | filestream_close(file); 24 | } 25 | 26 | void Libretro::BackupRam::save() 27 | { 28 | RFILE* file = filestream_open(globals.srmFilename.c_str(), RETRO_VFS_FILE_ACCESS_WRITE, RETRO_VFS_FILE_ACCESS_HINT_NONE); 29 | if (!file) 30 | return; 31 | 32 | filestream_write(file, neocd->memory.backupRam, Memory::BACKUPRAM_SIZE); 33 | filestream_close(file); 34 | } 35 | -------------------------------------------------------------------------------- /src/libretro_backupram.h: -------------------------------------------------------------------------------- 1 | #if !defined(LIBRETRO_BACKUPRAM) 2 | #define LIBRETRO_BACKUPRAM 3 | 4 | namespace Libretro 5 | { 6 | namespace BackupRam 7 | { 8 | void setFilename(const char* content_path); 9 | 10 | void load(); 11 | 12 | void save(); 13 | } // namespace BackupRam 14 | } // namespace Libretro 15 | 16 | #endif // LIBRETRO_BACKUPRAM 17 | -------------------------------------------------------------------------------- /src/libretro_bios.h: -------------------------------------------------------------------------------- 1 | #if !defined(LIBRETRO_BIOS_H) 2 | #define LIBRETRO_BIOS_H 3 | 4 | #include 5 | 6 | namespace Libretro 7 | { 8 | namespace Bios 9 | { 10 | void init(); 11 | 12 | bool load(); 13 | 14 | size_t descriptionToIndex(const char* description); 15 | } // namespace Bios 16 | } // namespace Libretro 17 | 18 | #endif // LIBRETRO_BIOS_H 19 | -------------------------------------------------------------------------------- /src/libretro_common.cpp: -------------------------------------------------------------------------------- 1 | #include "libretro_common.h" 2 | #include "neogeocd.h" 3 | 4 | // Collection of callbacks to the things we need 5 | LibretroCallbacks libretro; 6 | 7 | // Collection of global variables 8 | Globals globals; 9 | 10 | // Pointer to the emulator object 11 | NeoGeoCD* neocd = nullptr; 12 | -------------------------------------------------------------------------------- /src/libretro_input.h: -------------------------------------------------------------------------------- 1 | #if !defined(LIBRETRO_INPUT_H) 2 | #define LIBRETRO_INPUT_H 3 | 4 | namespace Libretro 5 | { 6 | namespace Input 7 | { 8 | void init(); 9 | 10 | void update(); 11 | } // namespace Input 12 | } // namespace Libretro 13 | 14 | #endif // LIBRETRO_INPUT_H 15 | -------------------------------------------------------------------------------- /src/libretro_log.h: -------------------------------------------------------------------------------- 1 | #if !defined(LIBRETRO_LOG_H) 2 | #define LIBRETRO_LOG_H 3 | 4 | #include "libretro.h" 5 | 6 | namespace Libretro 7 | { 8 | namespace Log 9 | { 10 | void init(); 11 | 12 | void message(retro_log_level level, const char* format, ...); 13 | } // namespace Log 14 | } // namespace Libretro 15 | 16 | #endif // LIBRETRO_LOG_H 17 | -------------------------------------------------------------------------------- /src/libretro_memmap.h: -------------------------------------------------------------------------------- 1 | #if !defined(LIBRETRO_MEMMAP_H) 2 | #define LIBRETRO_MEMMAP_H 3 | 4 | namespace Libretro 5 | { 6 | namespace Memmap 7 | { 8 | void init(); 9 | } // namespace Memmap 10 | } // namespace Libretro 11 | 12 | #endif // LIBRETRO_MEMMAP_H 13 | -------------------------------------------------------------------------------- /src/libretro_variables.h: -------------------------------------------------------------------------------- 1 | #if !defined(LIBRETRO_VARIABLES_H) 2 | #define LIBRETRO_VARIABLES_H 3 | 4 | namespace Libretro 5 | { 6 | namespace Variables 7 | { 8 | void init(); 9 | 10 | void update(bool reset); 11 | } // namespace Variables 12 | } // namespace Libretro 13 | 14 | #endif // LIBRETRO_VARIABLES_H 15 | -------------------------------------------------------------------------------- /src/m68kintf.h: -------------------------------------------------------------------------------- 1 | #ifndef M68KINTF_H 2 | #define M68KINTF_H 3 | 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | uint32_t m68k_read_memory_8(uint32_t address); 11 | void m68k_write_memory_8(uint32_t address, uint32_t data); 12 | uint32_t m68k_read_memory_16(uint32_t address); 13 | void m68k_write_memory_16(uint32_t address, uint32_t data); 14 | uint32_t m68k_read_memory_32(uint32_t address); 15 | void m68k_write_memory_32(uint32_t address, uint32_t data); 16 | 17 | int neocd_get_vector(int level); 18 | 19 | int neocd_illegal_handler(int instruction); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif 24 | 25 | #endif // M68KINTF_H 26 | -------------------------------------------------------------------------------- /src/memory_backupram.cpp: -------------------------------------------------------------------------------- 1 | #include "libretro_common.h" 2 | #include "memory_backupram.h" 3 | #include "neogeocd.h" 4 | 5 | static uint32_t backupRamReadByte(uint32_t address) 6 | { 7 | if (address & 1) 8 | return neocd->memory.backupRam[address >> 1]; 9 | 10 | return 0xFF; 11 | } 12 | 13 | static uint32_t backupRamReadWord(uint32_t address) 14 | { 15 | return (neocd->memory.backupRam[address >> 1] | 0xFF00); 16 | } 17 | 18 | static void backupRamWriteByte(uint32_t address, uint32_t data) 19 | { 20 | if (address & 1) 21 | neocd->memory.backupRam[address >> 1] = data; 22 | } 23 | 24 | static void backupRamWriteWord(uint32_t address, uint32_t data) 25 | { 26 | neocd->memory.backupRam[address >> 1] = data; 27 | } 28 | 29 | const Memory::Handlers backupRamHandlers = { 30 | backupRamReadByte, 31 | backupRamReadWord, 32 | backupRamWriteByte, 33 | backupRamWriteWord 34 | }; 35 | -------------------------------------------------------------------------------- /src/memory_backupram.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMORY_BACKUPRAM_H 2 | #define MEMORY_BACKUPRAM_H 3 | 4 | #include "memory.h" 5 | 6 | extern const Memory::Handlers backupRamHandlers; 7 | 8 | #endif // MEMORY_BACKUPRAM_H 9 | -------------------------------------------------------------------------------- /src/memory_cdintf.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMORY_CDINTF_H 2 | #define MEMORY_CDINTF_H 3 | 4 | #include "memory.h" 5 | 6 | extern const Memory::Handlers cdInterfaceHandlers; 7 | 8 | #endif // MEMORY_CDINTF_H 9 | -------------------------------------------------------------------------------- /src/memory_input.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMORY_INPUT_H 2 | #define MEMORY_INPUT_H 3 | 4 | #include "memory.h" 5 | 6 | extern const Memory::Handlers controller1Handlers; 7 | extern const Memory::Handlers controller2Handlers; 8 | extern const Memory::Handlers controller3Handlers; 9 | 10 | #endif // MEMORY_INPUT_H 11 | -------------------------------------------------------------------------------- /src/memory_mapped.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMORY_MAPPED_H 2 | #define MEMORY_MAPPED_H 3 | 4 | #include "memory.h" 5 | 6 | extern const Memory::Handlers mappedRamHandlers; 7 | 8 | #endif // MEMORY_MAPPED_H 9 | -------------------------------------------------------------------------------- /src/memory_paletteram.cpp: -------------------------------------------------------------------------------- 1 | #include "libretro_common.h" 2 | #include "memory_paletteram.h" 3 | #include "neogeocd.h" 4 | 5 | static uint32_t paletteRamReadByte(uint32_t address) 6 | { 7 | return *(reinterpret_cast(&neocd->memory.paletteRam[neocd->video.activePaletteBank * 4096]) + address); 8 | } 9 | 10 | static uint32_t paletteRamReadWord(uint32_t address) 11 | { 12 | return BIG_ENDIAN_WORD(neocd->memory.paletteRam[(neocd->video.activePaletteBank * 4096) + (address / 2)]); 13 | } 14 | 15 | static void paletteRamWriteByte(uint32_t address, uint32_t data) 16 | { 17 | uint32_t color = (neocd->video.activePaletteBank * 4096) + (address / 2); 18 | *(reinterpret_cast(&neocd->memory.paletteRam[neocd->video.activePaletteBank * 4096]) + address) = data; 19 | neocd->video.convertColor(color); 20 | } 21 | 22 | static void paletteRamWriteWord(uint32_t address, uint32_t data) 23 | { 24 | uint32_t color = (neocd->video.activePaletteBank * 4096) + (address / 2); 25 | neocd->memory.paletteRam[color] = BIG_ENDIAN_WORD(data); 26 | neocd->video.convertColor(color); 27 | } 28 | 29 | const Memory::Handlers paletteRamHandlers = { 30 | paletteRamReadByte, 31 | paletteRamReadWord, 32 | paletteRamWriteByte, 33 | paletteRamWriteWord 34 | }; 35 | -------------------------------------------------------------------------------- /src/memory_paletteram.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMORY_PALETTERAM_H 2 | #define MEMORY_PALETTERAM_H 3 | 4 | #include "memory.h" 5 | 6 | extern const Memory::Handlers paletteRamHandlers; 7 | 8 | #endif // MEMORY_PALETTERAM_H 9 | -------------------------------------------------------------------------------- /src/memory_switches.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMORY_SWITCHES_H 2 | #define MEMORY_SWITCHES_H 3 | 4 | #include "memory.h" 5 | 6 | extern const Memory::Handlers switchHandlers; 7 | 8 | #endif // MEMORY_SWITCHES_H 9 | -------------------------------------------------------------------------------- /src/memory_video.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMORY_VIDEO_H 2 | #define MEMORY_VIDEO_H 3 | 4 | #include "memory.h" 5 | 6 | extern const Memory::Handlers videoRamHandlers; 7 | 8 | #endif // MEMORY_VIDEO_H 9 | -------------------------------------------------------------------------------- /src/memory_z80comm.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMORY_Z80COMM_H 2 | #define MEMORY_Z80COMM_H 3 | 4 | #include "memory.h" 5 | 6 | extern const Memory::Handlers z80CommunicationHandlers; 7 | 8 | #endif // MEMORY_Z80COMM_H 9 | -------------------------------------------------------------------------------- /src/misc.h: -------------------------------------------------------------------------------- 1 | #ifndef MISC_H 2 | #define MISC_H 3 | 4 | #ifndef UNUSED_ARG 5 | #define UNUSED_ARG(x) (void)(x) 6 | #endif 7 | 8 | #endif // MISC_H 9 | -------------------------------------------------------------------------------- /src/oggfile.h: -------------------------------------------------------------------------------- 1 | #ifndef OGGFILE_H 2 | #define OGGFILE_H 3 | 4 | #define OV_EXCLUDE_STATIC_CALLBACKS 5 | 6 | #include 7 | 8 | #include "abstractfile.h" 9 | #include "vorbis/vorbisfile.h" 10 | 11 | class OggFile 12 | { 13 | public: 14 | OggFile(); 15 | ~OggFile(); 16 | 17 | // Non copyable 18 | OggFile(const OggFile&) = delete; 19 | 20 | // Non copyable 21 | OggFile& operator=(const OggFile&) = delete; 22 | 23 | bool initialize(AbstractFile* file); 24 | 25 | size_t read(char *data, size_t size); 26 | 27 | bool seek(size_t position); 28 | 29 | size_t length(); 30 | 31 | void cleanup(); 32 | 33 | // Declare all callbacks as friends so they can modify the internals 34 | friend size_t ogg_read_cb(void *ptr, size_t size, size_t nmemb, void *datasource); 35 | friend int ogg_seek_cb(void *datasource, ogg_int64_t offset, int whence); 36 | friend long ogg_tell_cb(void *datasource); 37 | 38 | protected: 39 | OggVorbis_File m_vorbisFile; 40 | AbstractFile* m_file; 41 | bool m_isOpen; 42 | }; 43 | 44 | #endif // OGGFILE_H 45 | -------------------------------------------------------------------------------- /src/packedstruct.h: -------------------------------------------------------------------------------- 1 | #ifndef PACKEDSTRUCT_H 2 | #define PACKEDSTRUCT_H 3 | 4 | #if defined(_MSC_VER) 5 | #define PACKED 6 | #elif (defined(__GNUC__) || defined(__clang__)) 7 | #define PACKED __attribute__((packed)) 8 | #else 9 | #error Unknown compiler! 10 | #endif 11 | 12 | #endif // PACKEDSTRUCT_H 13 | -------------------------------------------------------------------------------- /src/path.h: -------------------------------------------------------------------------------- 1 | #ifndef PATH_H 2 | #define PATH_H 1 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | std::string path_replace_filename(const char* path, const char* new_filename); 10 | 11 | std::string path_get_filename(const char* path); 12 | 13 | bool path_is_empty(const char* buffer); 14 | 15 | bool path_ends_with_slash(const char* buffer); 16 | 17 | std::string system_path(); 18 | 19 | std::string make_path_separator(const char* path, const char* separator, const char* filename); 20 | 21 | std::string make_system_path(const char* filename); 22 | 23 | std::string make_save_path(const char* filename); 24 | 25 | std::string make_path(const char* path, const char* filename); 26 | 27 | std::string make_srm_path(bool per_content_saves, const char* content_path); 28 | 29 | bool string_compare_insensitive(const std::string& a, const std::string& b); 30 | 31 | bool string_compare_insensitive(const char* a, const char* b); 32 | 33 | bool path_is_archive(const std::string& path); 34 | 35 | bool path_is_bios_file(const std::string& path); 36 | 37 | void split_compressed_path(const std::string& path, std::string& archive, std::string& file); 38 | 39 | bool path_is_absolute(const std::string& path); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/round.h: -------------------------------------------------------------------------------- 1 | #ifndef ROUND_H 2 | #define ROUND_H 1 3 | 4 | #include 5 | 6 | template 7 | constexpr I round(const F& f) 8 | { 9 | static_assert(std::is_integral::value, "I must be integral type"); 10 | static_assert(std::is_floating_point::value, "F must be floating point type"); 11 | 12 | return f >= F(0) ? I(f + F(0.5)) : I(f - F(I(f - F(1))) + F(0.5)) + I(f - F(1)); 13 | } 14 | 15 | #endif // ROUND_H 16 | -------------------------------------------------------------------------------- /src/timeprofiler.cpp: -------------------------------------------------------------------------------- 1 | #include "timeprofiler.h" 2 | 3 | #ifdef PROFILE_ENABLED 4 | 5 | #include 6 | 7 | bool g_profilingAccumulatorsInitialized = false; 8 | double g_profilingAccumulators[CategoryCount]; 9 | 10 | TimeProfiler::TimeProfiler(ProfilingCategory category) : m_category(category) 11 | { 12 | if (!g_profilingAccumulatorsInitialized) 13 | { 14 | std::memset(g_profilingAccumulators, 0, sizeof(g_profilingAccumulators)); 15 | g_profilingAccumulatorsInitialized = true; 16 | } 17 | 18 | start(); 19 | } 20 | 21 | TimeProfiler::~TimeProfiler() 22 | { 23 | end(); 24 | } 25 | 26 | void TimeProfiler::start() 27 | { 28 | m_start = std::chrono::high_resolution_clock::now(); 29 | m_running = true; 30 | } 31 | 32 | void TimeProfiler::end() 33 | { 34 | if (!m_running) 35 | return; 36 | 37 | std::chrono::time_point end = std::chrono::high_resolution_clock::now(); 38 | 39 | std::chrono::duration elapsed = end - m_start; 40 | 41 | g_profilingAccumulators[m_category] += elapsed.count(); 42 | 43 | m_running = false; 44 | } 45 | 46 | #endif // PROFILE_ENABLED 47 | -------------------------------------------------------------------------------- /src/timeprofiler.h: -------------------------------------------------------------------------------- 1 | #ifndef TIMEPROFILER_H 2 | #define TIMEPROFILER_H 3 | 4 | //#define PROFILE_ENABLED 5 | 6 | enum ProfilingCategory 7 | { 8 | Total = 0, 9 | AudioCD, 10 | AudioYM2610, 11 | CpuM68K, 12 | CpuZ80, 13 | VideoAndIRQ, 14 | InputPolling, 15 | CategoryCount 16 | }; 17 | 18 | #ifdef PROFILE_ENABLED 19 | 20 | #include 21 | 22 | extern bool g_profilingAccumulatorsInitialized; 23 | extern double g_profilingAccumulators[CategoryCount]; 24 | 25 | class TimeProfiler 26 | { 27 | public: 28 | explicit TimeProfiler(ProfilingCategory category); 29 | virtual ~TimeProfiler(); 30 | 31 | void start(); 32 | void end(); 33 | 34 | protected: 35 | std::chrono::time_point m_start; 36 | bool m_running; 37 | ProfilingCategory m_category; 38 | }; 39 | 40 | #define PROFILE(ObjectName, Category) TimeProfiler ObjectName(Category) 41 | #define PROFILE_START(ObjectName) ObjectName.start() 42 | #define PROFILE_END(ObjectName) ObjectName.end() 43 | 44 | #else 45 | 46 | #define PROFILE(ObjectName, Category) 47 | #define PROFILE_START(ObjectName) 48 | #define PROFILE_END(ObjectName) 49 | 50 | #endif // PROFILE_ENABLED 51 | 52 | #endif // TIMEPROFILER_H 53 | -------------------------------------------------------------------------------- /src/wavfile.h: -------------------------------------------------------------------------------- 1 | #ifndef WAVFILE_H 2 | #define WAVFILE_H 3 | 4 | #include 5 | 6 | #include "abstractfile.h" 7 | 8 | class WavFile 9 | { 10 | public: 11 | WavFile(); 12 | ~WavFile(); 13 | 14 | // Non copyable 15 | WavFile(const WavFile&) = delete; 16 | 17 | // Non copyable 18 | WavFile& operator=(const WavFile&) = delete; 19 | 20 | bool initialize(AbstractFile* file); 21 | 22 | int64_t read(void *data, int64_t size); 23 | 24 | bool seek(int64_t position); 25 | 26 | int64_t length(); 27 | 28 | void cleanup(); 29 | 30 | protected: 31 | AbstractFile* m_file; 32 | int64_t m_currentPosition; 33 | int64_t m_dataStart; 34 | int64_t m_dataSize; 35 | }; 36 | 37 | #endif // WAVFILE_H 38 | -------------------------------------------------------------------------------- /src/wavstruct.h: -------------------------------------------------------------------------------- 1 | #ifndef WAVSTRUCT_H 2 | #define WAVSTRUCT_H 3 | 4 | #include 5 | 6 | #include "packedstruct.h" 7 | 8 | #ifdef _MSC_VER 9 | #pragma pack(push,1) 10 | #endif 11 | 12 | struct PACKED WaveRiffHeader 13 | { 14 | uint32_t magic; 15 | uint32_t fileSize; 16 | uint32_t formatId; 17 | }; 18 | 19 | static_assert(sizeof(WaveRiffHeader) == 12, "Struct RIFF Header should be exactly 12 bytes!"); 20 | 21 | struct PACKED WaveFmtChunk 22 | { 23 | uint16_t audioFormat; 24 | uint16_t channelCount; 25 | uint32_t sampleRate; 26 | uint32_t bytesPerSecond; 27 | uint16_t bytesPerBlock; 28 | uint16_t bitsPerSample; 29 | }; 30 | 31 | static_assert(sizeof(WaveFmtChunk) == 16, "Struct Wave Format Header should be exactly 16 bytes!"); 32 | 33 | struct PACKED WaveChunkHeader 34 | { 35 | uint32_t magic; 36 | uint32_t dataSize; 37 | }; 38 | 39 | static_assert(sizeof(WaveChunkHeader) == 8, "Struct Wave Chunk Header should be exactly 8 bytes!"); 40 | 41 | #ifdef _MSC_VER 42 | #pragma pack(pop) 43 | #endif 44 | 45 | #endif // WAVSTRUCT_H 46 | -------------------------------------------------------------------------------- /src/z80intf.h: -------------------------------------------------------------------------------- 1 | #ifndef Z80INTF_H 2 | #define Z80INTF_H 3 | 4 | #include 5 | 6 | #include "inline.h" 7 | 8 | #define Uint8 uint8_t 9 | #define Sint8 int8_t 10 | #define Uint16 uint16_t 11 | #define Uint32 uint32_t 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | uint16_t io_read_byte_8(uint16_t port); 18 | 19 | void io_write_byte_8(uint16_t port, uint16_t value); 20 | 21 | uint8_t program_read_byte_8(uint16_t addr); 22 | 23 | void program_write_byte_8(uint16_t addr, uint8_t value); 24 | 25 | int z80_irq_callback(int parameter); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif // Z80INTF_H 32 | --------------------------------------------------------------------------------