electrobun 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +3 -0
- package/dist/webview +0 -0
- package/package.json +1 -1
- package/src/cli/build/electrobun +0 -0
- package/example/assets/electrobun-logo-32-template.png +0 -0
- package/example/buildScript.ts +0 -1
- package/example/bun.lockb +0 -0
- package/example/electrobun.config +0 -48
- package/example/icon.iconset/icon_128x128.png +0 -0
- package/example/icon.iconset/icon_128x128@2x.png +0 -0
- package/example/icon.iconset/icon_16x16.png +0 -0
- package/example/icon.iconset/icon_16x16@2x.png +0 -0
- package/example/icon.iconset/icon_256x256.png +0 -0
- package/example/icon.iconset/icon_256x256@2x.png +0 -0
- package/example/icon.iconset/icon_32x32.png +0 -0
- package/example/icon.iconset/icon_32x32@2x.png +0 -0
- package/example/icon.iconset/icon_512x512.png +0 -0
- package/example/icon.iconset/icon_512x512@2x.png +0 -0
- package/example/package-lock.json +0 -32
- package/example/package.json +0 -11
- package/example/readme.md +0 -0
- package/example/src/bun/index.ts +0 -403
- package/example/src/mainview/index.css +0 -4
- package/example/src/mainview/index.html +0 -13
- package/example/src/mainview/index.ts +0 -45
- package/example/src/mainview/rpc.ts +0 -36
- package/example/src/myextension/preload.ts +0 -15
- package/example/src/myextension/rpc.ts +0 -15
- package/example/src/webviewtag/electrobun.png +0 -0
- package/example/src/webviewtag/index.html +0 -94
- package/example/src/webviewtag/index.ts +0 -26
- package/src/bsdiff/bsdiff.zig +0 -842
- package/src/bsdiff/bspatch.zig +0 -253
- package/src/bsdiff/build.zig +0 -73
- package/src/bsdiff/zig-out/bin/bsdiff +0 -0
- package/src/bsdiff/zig-out/bin/bspatch +0 -0
- package/src/bsdiff/zig-out/lib/libzstd.a +0 -0
- package/src/bsdiff/zstd/.buckconfig +0 -9
- package/src/bsdiff/zstd/.buckversion +0 -1
- package/src/bsdiff/zstd/.circleci/config.yml +0 -123
- package/src/bsdiff/zstd/.circleci/images/primary/Dockerfile +0 -9
- package/src/bsdiff/zstd/.cirrus.yml +0 -10
- package/src/bsdiff/zstd/.gitattributes +0 -21
- package/src/bsdiff/zstd/.github/ISSUE_TEMPLATE/bug_report.md +0 -35
- package/src/bsdiff/zstd/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
- package/src/bsdiff/zstd/.github/dependabot.yml +0 -6
- package/src/bsdiff/zstd/.github/workflows/commit.yml +0 -89
- package/src/bsdiff/zstd/.github/workflows/dev-long-tests.yml +0 -297
- package/src/bsdiff/zstd/.github/workflows/dev-short-tests.yml +0 -633
- package/src/bsdiff/zstd/.github/workflows/nightly.yml +0 -65
- package/src/bsdiff/zstd/.github/workflows/publish-release-artifacts.yml +0 -73
- package/src/bsdiff/zstd/.github/workflows/scorecards.yml +0 -64
- package/src/bsdiff/zstd/.github/workflows/windows-artifacts.yml +0 -58
- package/src/bsdiff/zstd/CHANGELOG +0 -837
- package/src/bsdiff/zstd/CODE_OF_CONDUCT.md +0 -5
- package/src/bsdiff/zstd/CONTRIBUTING.md +0 -489
- package/src/bsdiff/zstd/COPYING +0 -339
- package/src/bsdiff/zstd/LICENSE +0 -30
- package/src/bsdiff/zstd/Makefile +0 -457
- package/src/bsdiff/zstd/Package.swift +0 -36
- package/src/bsdiff/zstd/README.md +0 -227
- package/src/bsdiff/zstd/SECURITY.md +0 -15
- package/src/bsdiff/zstd/TESTING.md +0 -43
- package/src/bsdiff/zstd/build/LICENSE +0 -0
- package/src/bsdiff/zstd/build/README.md +0 -56
- package/src/bsdiff/zstd/build/VS2008/fullbench/fullbench.vcproj +0 -549
- package/src/bsdiff/zstd/build/VS2008/fuzzer/fuzzer.vcproj +0 -585
- package/src/bsdiff/zstd/build/VS2008/zstd/zstd.vcproj +0 -677
- package/src/bsdiff/zstd/build/VS2008/zstd.sln +0 -56
- package/src/bsdiff/zstd/build/VS2008/zstdlib/zstdlib.vcproj +0 -635
- package/src/bsdiff/zstd/build/VS2010/CompileAsCpp.props +0 -8
- package/src/bsdiff/zstd/build/VS2010/datagen/datagen.vcxproj +0 -170
- package/src/bsdiff/zstd/build/VS2010/fullbench/fullbench.vcxproj +0 -218
- package/src/bsdiff/zstd/build/VS2010/fullbench-dll/fullbench-dll.vcxproj +0 -189
- package/src/bsdiff/zstd/build/VS2010/fuzzer/fuzzer.vcxproj +0 -223
- package/src/bsdiff/zstd/build/VS2010/libzstd/libzstd.vcxproj +0 -242
- package/src/bsdiff/zstd/build/VS2010/libzstd-dll/libzstd-dll.rc +0 -51
- package/src/bsdiff/zstd/build/VS2010/libzstd-dll/libzstd-dll.vcxproj +0 -249
- package/src/bsdiff/zstd/build/VS2010/zstd/zstd.rc +0 -51
- package/src/bsdiff/zstd/build/VS2010/zstd/zstd.vcxproj +0 -265
- package/src/bsdiff/zstd/build/VS2010/zstd.sln +0 -89
- package/src/bsdiff/zstd/build/VS_scripts/README.md +0 -64
- package/src/bsdiff/zstd/build/VS_scripts/build.VS2010.cmd +0 -7
- package/src/bsdiff/zstd/build/VS_scripts/build.VS2012.cmd +0 -6
- package/src/bsdiff/zstd/build/VS_scripts/build.VS2013.cmd +0 -7
- package/src/bsdiff/zstd/build/VS_scripts/build.VS2015.cmd +0 -7
- package/src/bsdiff/zstd/build/VS_scripts/build.VS2017.cmd +0 -7
- package/src/bsdiff/zstd/build/VS_scripts/build.VS2017Community.cmd +0 -7
- package/src/bsdiff/zstd/build/VS_scripts/build.VS2017Enterprise.cmd +0 -7
- package/src/bsdiff/zstd/build/VS_scripts/build.VS2017Professional.cmd +0 -7
- package/src/bsdiff/zstd/build/VS_scripts/build.generic.cmd +0 -72
- package/src/bsdiff/zstd/build/cmake/CMakeLists.txt +0 -216
- package/src/bsdiff/zstd/build/cmake/CMakeModules/AddZstdCompilationFlags.cmake +0 -121
- package/src/bsdiff/zstd/build/cmake/CMakeModules/FindLibLZ4.cmake +0 -49
- package/src/bsdiff/zstd/build/cmake/CMakeModules/GetZstdLibraryVersion.cmake +0 -10
- package/src/bsdiff/zstd/build/cmake/CMakeModules/JoinPaths.cmake +0 -23
- package/src/bsdiff/zstd/build/cmake/README.md +0 -136
- package/src/bsdiff/zstd/build/cmake/contrib/CMakeLists.txt +0 -13
- package/src/bsdiff/zstd/build/cmake/contrib/gen_html/CMakeLists.txt +0 -30
- package/src/bsdiff/zstd/build/cmake/contrib/pzstd/CMakeLists.txt +0 -39
- package/src/bsdiff/zstd/build/cmake/lib/CMakeLists.txt +0 -253
- package/src/bsdiff/zstd/build/cmake/lib/cmake_uninstall.cmake.in +0 -22
- package/src/bsdiff/zstd/build/cmake/programs/CMakeLists.txt +0 -144
- package/src/bsdiff/zstd/build/cmake/tests/CMakeLists.txt +0 -118
- package/src/bsdiff/zstd/build/cmake/zstdConfig.cmake.in +0 -10
- package/src/bsdiff/zstd/build/meson/GetZstdLibraryVersion.py +0 -39
- package/src/bsdiff/zstd/build/meson/InstallSymlink.py +0 -55
- package/src/bsdiff/zstd/build/meson/README.md +0 -38
- package/src/bsdiff/zstd/build/meson/contrib/gen_html/meson.build +0 -30
- package/src/bsdiff/zstd/build/meson/contrib/meson.build +0 -12
- package/src/bsdiff/zstd/build/meson/contrib/pzstd/meson.build +0 -25
- package/src/bsdiff/zstd/build/meson/lib/meson.build +0 -167
- package/src/bsdiff/zstd/build/meson/meson.build +0 -145
- package/src/bsdiff/zstd/build/meson/meson_options.txt +0 -36
- package/src/bsdiff/zstd/build/meson/programs/meson.build +0 -124
- package/src/bsdiff/zstd/build/meson/tests/meson.build +0 -217
- package/src/bsdiff/zstd/build/meson/tests/valgrindTest.py +0 -90
- package/src/bsdiff/zstd/build/single_file_libs/README.md +0 -33
- package/src/bsdiff/zstd/build/single_file_libs/build_decoder_test.sh +0 -91
- package/src/bsdiff/zstd/build/single_file_libs/build_library_test.sh +0 -97
- package/src/bsdiff/zstd/build/single_file_libs/combine.py +0 -234
- package/src/bsdiff/zstd/build/single_file_libs/combine.sh +0 -249
- package/src/bsdiff/zstd/build/single_file_libs/create_single_file_decoder.sh +0 -19
- package/src/bsdiff/zstd/build/single_file_libs/create_single_file_library.sh +0 -19
- package/src/bsdiff/zstd/build/single_file_libs/examples/README.md +0 -11
- package/src/bsdiff/zstd/build/single_file_libs/examples/emscripten.c +0 -340
- package/src/bsdiff/zstd/build/single_file_libs/examples/roundtrip.c +0 -83
- package/src/bsdiff/zstd/build/single_file_libs/examples/shell.html +0 -31
- package/src/bsdiff/zstd/build/single_file_libs/examples/simple.c +0 -75
- package/src/bsdiff/zstd/build/single_file_libs/examples/testcard-dxt1.inl +0 -2731
- package/src/bsdiff/zstd/build/single_file_libs/examples/testcard-zstd.inl +0 -261
- package/src/bsdiff/zstd/build/single_file_libs/examples/testcard.png +0 -0
- package/src/bsdiff/zstd/build/single_file_libs/zstd-in.c +0 -90
- package/src/bsdiff/zstd/build/single_file_libs/zstddeclib-in.c +0 -62
- package/src/bsdiff/zstd/contrib/VS2005/README.md +0 -3
- package/src/bsdiff/zstd/contrib/VS2005/fullbench/fullbench.vcproj +0 -440
- package/src/bsdiff/zstd/contrib/VS2005/fuzzer/fuzzer.vcproj +0 -488
- package/src/bsdiff/zstd/contrib/VS2005/zstd/zstd.vcproj +0 -552
- package/src/bsdiff/zstd/contrib/VS2005/zstd.sln +0 -55
- package/src/bsdiff/zstd/contrib/VS2005/zstdlib/zstdlib.vcproj +0 -546
- package/src/bsdiff/zstd/contrib/cleanTabs +0 -2
- package/src/bsdiff/zstd/contrib/diagnose_corruption/Makefile +0 -35
- package/src/bsdiff/zstd/contrib/diagnose_corruption/check_flipped_bits.c +0 -400
- package/src/bsdiff/zstd/contrib/docker/Dockerfile +0 -20
- package/src/bsdiff/zstd/contrib/docker/README.md +0 -20
- package/src/bsdiff/zstd/contrib/externalSequenceProducer/Makefile +0 -40
- package/src/bsdiff/zstd/contrib/externalSequenceProducer/README.md +0 -14
- package/src/bsdiff/zstd/contrib/externalSequenceProducer/main.c +0 -107
- package/src/bsdiff/zstd/contrib/externalSequenceProducer/sequence_producer.c +0 -80
- package/src/bsdiff/zstd/contrib/externalSequenceProducer/sequence_producer.h +0 -26
- package/src/bsdiff/zstd/contrib/freestanding_lib/freestanding.py +0 -774
- package/src/bsdiff/zstd/contrib/gen_html/Makefile +0 -51
- package/src/bsdiff/zstd/contrib/gen_html/README.md +0 -31
- package/src/bsdiff/zstd/contrib/gen_html/gen-zstd-manual.sh +0 -9
- package/src/bsdiff/zstd/contrib/gen_html/gen_html.cpp +0 -224
- package/src/bsdiff/zstd/contrib/largeNbDicts/Makefile +0 -58
- package/src/bsdiff/zstd/contrib/largeNbDicts/README.md +0 -33
- package/src/bsdiff/zstd/contrib/largeNbDicts/largeNbDicts.c +0 -1085
- package/src/bsdiff/zstd/contrib/linux-kernel/Makefile +0 -108
- package/src/bsdiff/zstd/contrib/linux-kernel/README.md +0 -14
- package/src/bsdiff/zstd/contrib/linux-kernel/btrfs-benchmark.sh +0 -104
- package/src/bsdiff/zstd/contrib/linux-kernel/btrfs-extract-benchmark.sh +0 -99
- package/src/bsdiff/zstd/contrib/linux-kernel/decompress_sources.h +0 -34
- package/src/bsdiff/zstd/contrib/linux-kernel/linux.mk +0 -43
- package/src/bsdiff/zstd/contrib/linux-kernel/linux_zstd.h +0 -447
- package/src/bsdiff/zstd/contrib/linux-kernel/mem.h +0 -262
- package/src/bsdiff/zstd/contrib/linux-kernel/squashfs-benchmark.sh +0 -39
- package/src/bsdiff/zstd/contrib/linux-kernel/test/Makefile +0 -49
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/asm/unaligned.h +0 -187
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/compiler.h +0 -23
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/errno.h +0 -15
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/kernel.h +0 -19
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/limits.h +0 -15
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/math64.h +0 -15
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/module.h +0 -20
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/printk.h +0 -15
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/stddef.h +0 -15
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/swab.h +0 -16
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/types.h +0 -16
- package/src/bsdiff/zstd/contrib/linux-kernel/test/include/linux/xxhash.h +0 -745
- package/src/bsdiff/zstd/contrib/linux-kernel/test/macro-test.sh +0 -44
- package/src/bsdiff/zstd/contrib/linux-kernel/test/static_test.c +0 -52
- package/src/bsdiff/zstd/contrib/linux-kernel/test/test.c +0 -229
- package/src/bsdiff/zstd/contrib/linux-kernel/zstd_common_module.c +0 -29
- package/src/bsdiff/zstd/contrib/linux-kernel/zstd_compress_module.c +0 -164
- package/src/bsdiff/zstd/contrib/linux-kernel/zstd_decompress_module.c +0 -105
- package/src/bsdiff/zstd/contrib/linux-kernel/zstd_deps.h +0 -121
- package/src/bsdiff/zstd/contrib/match_finders/README.md +0 -42
- package/src/bsdiff/zstd/contrib/match_finders/zstd_edist.c +0 -558
- package/src/bsdiff/zstd/contrib/match_finders/zstd_edist.h +0 -70
- package/src/bsdiff/zstd/contrib/premake/premake4.lua +0 -6
- package/src/bsdiff/zstd/contrib/premake/zstd.lua +0 -80
- package/src/bsdiff/zstd/contrib/pzstd/BUCK +0 -72
- package/src/bsdiff/zstd/contrib/pzstd/ErrorHolder.h +0 -54
- package/src/bsdiff/zstd/contrib/pzstd/Logging.h +0 -72
- package/src/bsdiff/zstd/contrib/pzstd/Makefile +0 -265
- package/src/bsdiff/zstd/contrib/pzstd/Options.cpp +0 -424
- package/src/bsdiff/zstd/contrib/pzstd/Options.h +0 -71
- package/src/bsdiff/zstd/contrib/pzstd/Pzstd.cpp +0 -618
- package/src/bsdiff/zstd/contrib/pzstd/Pzstd.h +0 -153
- package/src/bsdiff/zstd/contrib/pzstd/README.md +0 -56
- package/src/bsdiff/zstd/contrib/pzstd/SkippableFrame.cpp +0 -30
- package/src/bsdiff/zstd/contrib/pzstd/SkippableFrame.h +0 -64
- package/src/bsdiff/zstd/contrib/pzstd/images/Cspeed.png +0 -0
- package/src/bsdiff/zstd/contrib/pzstd/images/Dspeed.png +0 -0
- package/src/bsdiff/zstd/contrib/pzstd/main.cpp +0 -27
- package/src/bsdiff/zstd/contrib/pzstd/test/BUCK +0 -37
- package/src/bsdiff/zstd/contrib/pzstd/test/OptionsTest.cpp +0 -536
- package/src/bsdiff/zstd/contrib/pzstd/test/PzstdTest.cpp +0 -149
- package/src/bsdiff/zstd/contrib/pzstd/test/RoundTrip.h +0 -86
- package/src/bsdiff/zstd/contrib/pzstd/test/RoundTripTest.cpp +0 -86
- package/src/bsdiff/zstd/contrib/pzstd/utils/BUCK +0 -75
- package/src/bsdiff/zstd/contrib/pzstd/utils/Buffer.h +0 -99
- package/src/bsdiff/zstd/contrib/pzstd/utils/FileSystem.h +0 -96
- package/src/bsdiff/zstd/contrib/pzstd/utils/Likely.h +0 -28
- package/src/bsdiff/zstd/contrib/pzstd/utils/Portability.h +0 -16
- package/src/bsdiff/zstd/contrib/pzstd/utils/Range.h +0 -133
- package/src/bsdiff/zstd/contrib/pzstd/utils/ResourcePool.h +0 -96
- package/src/bsdiff/zstd/contrib/pzstd/utils/ScopeGuard.h +0 -50
- package/src/bsdiff/zstd/contrib/pzstd/utils/ThreadPool.h +0 -58
- package/src/bsdiff/zstd/contrib/pzstd/utils/WorkQueue.h +0 -181
- package/src/bsdiff/zstd/contrib/pzstd/utils/test/BUCK +0 -35
- package/src/bsdiff/zstd/contrib/pzstd/utils/test/BufferTest.cpp +0 -89
- package/src/bsdiff/zstd/contrib/pzstd/utils/test/RangeTest.cpp +0 -82
- package/src/bsdiff/zstd/contrib/pzstd/utils/test/ResourcePoolTest.cpp +0 -72
- package/src/bsdiff/zstd/contrib/pzstd/utils/test/ScopeGuardTest.cpp +0 -28
- package/src/bsdiff/zstd/contrib/pzstd/utils/test/ThreadPoolTest.cpp +0 -71
- package/src/bsdiff/zstd/contrib/pzstd/utils/test/WorkQueueTest.cpp +0 -282
- package/src/bsdiff/zstd/contrib/recovery/Makefile +0 -35
- package/src/bsdiff/zstd/contrib/recovery/recover_directory.c +0 -152
- package/src/bsdiff/zstd/contrib/seekable_format/README.md +0 -42
- package/src/bsdiff/zstd/contrib/seekable_format/examples/Makefile +0 -53
- package/src/bsdiff/zstd/contrib/seekable_format/examples/parallel_compression.c +0 -214
- package/src/bsdiff/zstd/contrib/seekable_format/examples/parallel_processing.c +0 -194
- package/src/bsdiff/zstd/contrib/seekable_format/examples/seekable_compression.c +0 -136
- package/src/bsdiff/zstd/contrib/seekable_format/examples/seekable_decompression.c +0 -141
- package/src/bsdiff/zstd/contrib/seekable_format/examples/seekable_decompression_mem.c +0 -147
- package/src/bsdiff/zstd/contrib/seekable_format/tests/Makefile +0 -38
- package/src/bsdiff/zstd/contrib/seekable_format/tests/seekable_tests.c +0 -363
- package/src/bsdiff/zstd/contrib/seekable_format/zstd_seekable.h +0 -226
- package/src/bsdiff/zstd/contrib/seekable_format/zstd_seekable_compression_format.md +0 -116
- package/src/bsdiff/zstd/contrib/seekable_format/zstdseek_compress.c +0 -365
- package/src/bsdiff/zstd/contrib/seekable_format/zstdseek_decompress.c +0 -595
- package/src/bsdiff/zstd/contrib/seqBench/Makefile +0 -58
- package/src/bsdiff/zstd/contrib/seqBench/seqBench.c +0 -53
- package/src/bsdiff/zstd/contrib/snap/snapcraft.yaml +0 -28
- package/src/bsdiff/zstd/doc/README.md +0 -26
- package/src/bsdiff/zstd/doc/decompressor_errata.md +0 -148
- package/src/bsdiff/zstd/doc/decompressor_permissive.md +0 -60
- package/src/bsdiff/zstd/doc/educational_decoder/Makefile +0 -62
- package/src/bsdiff/zstd/doc/educational_decoder/README.md +0 -36
- package/src/bsdiff/zstd/doc/educational_decoder/harness.c +0 -119
- package/src/bsdiff/zstd/doc/educational_decoder/zstd_decompress.c +0 -2323
- package/src/bsdiff/zstd/doc/educational_decoder/zstd_decompress.h +0 -61
- package/src/bsdiff/zstd/doc/images/CSpeed2.png +0 -0
- package/src/bsdiff/zstd/doc/images/DCspeed5.png +0 -0
- package/src/bsdiff/zstd/doc/images/DSpeed3.png +0 -0
- package/src/bsdiff/zstd/doc/images/cdict_v136.png +0 -0
- package/src/bsdiff/zstd/doc/images/dict-cr.png +0 -0
- package/src/bsdiff/zstd/doc/images/dict-cs.png +0 -0
- package/src/bsdiff/zstd/doc/images/dict-ds.png +0 -0
- package/src/bsdiff/zstd/doc/images/zstd_cdict_v1_3_5.png +0 -0
- package/src/bsdiff/zstd/doc/images/zstd_logo86.png +0 -0
- package/src/bsdiff/zstd/doc/zstd_compression_format.md +0 -1737
- package/src/bsdiff/zstd/doc/zstd_manual.html +0 -2170
- package/src/bsdiff/zstd/examples/Makefile +0 -93
- package/src/bsdiff/zstd/examples/README.md +0 -46
- package/src/bsdiff/zstd/examples/common.h +0 -246
- package/src/bsdiff/zstd/examples/dictionary_compression.c +0 -107
- package/src/bsdiff/zstd/examples/dictionary_decompression.c +0 -99
- package/src/bsdiff/zstd/examples/multiple_simple_compression.c +0 -116
- package/src/bsdiff/zstd/examples/multiple_streaming_compression.c +0 -133
- package/src/bsdiff/zstd/examples/simple_compression.c +0 -68
- package/src/bsdiff/zstd/examples/simple_decompression.c +0 -65
- package/src/bsdiff/zstd/examples/streaming_compression.c +0 -146
- package/src/bsdiff/zstd/examples/streaming_compression_thread_pool.c +0 -180
- package/src/bsdiff/zstd/examples/streaming_decompression.c +0 -100
- package/src/bsdiff/zstd/examples/streaming_memory_usage.c +0 -137
- package/src/bsdiff/zstd/lib/BUCK +0 -232
- package/src/bsdiff/zstd/lib/Makefile +0 -369
- package/src/bsdiff/zstd/lib/README.md +0 -237
- package/src/bsdiff/zstd/lib/common/allocations.h +0 -55
- package/src/bsdiff/zstd/lib/common/bits.h +0 -200
- package/src/bsdiff/zstd/lib/common/bitstream.h +0 -457
- package/src/bsdiff/zstd/lib/common/compiler.h +0 -450
- package/src/bsdiff/zstd/lib/common/cpu.h +0 -249
- package/src/bsdiff/zstd/lib/common/debug.c +0 -30
- package/src/bsdiff/zstd/lib/common/debug.h +0 -116
- package/src/bsdiff/zstd/lib/common/entropy_common.c +0 -340
- package/src/bsdiff/zstd/lib/common/error_private.c +0 -63
- package/src/bsdiff/zstd/lib/common/error_private.h +0 -168
- package/src/bsdiff/zstd/lib/common/fse.h +0 -640
- package/src/bsdiff/zstd/lib/common/fse_decompress.c +0 -313
- package/src/bsdiff/zstd/lib/common/huf.h +0 -286
- package/src/bsdiff/zstd/lib/common/mem.h +0 -426
- package/src/bsdiff/zstd/lib/common/pool.c +0 -371
- package/src/bsdiff/zstd/lib/common/pool.h +0 -90
- package/src/bsdiff/zstd/lib/common/portability_macros.h +0 -158
- package/src/bsdiff/zstd/lib/common/threading.c +0 -182
- package/src/bsdiff/zstd/lib/common/threading.h +0 -150
- package/src/bsdiff/zstd/lib/common/xxhash.c +0 -18
- package/src/bsdiff/zstd/lib/common/xxhash.h +0 -7020
- package/src/bsdiff/zstd/lib/common/zstd_common.c +0 -48
- package/src/bsdiff/zstd/lib/common/zstd_deps.h +0 -111
- package/src/bsdiff/zstd/lib/common/zstd_internal.h +0 -392
- package/src/bsdiff/zstd/lib/common/zstd_trace.h +0 -163
- package/src/bsdiff/zstd/lib/compress/clevels.h +0 -134
- package/src/bsdiff/zstd/lib/compress/fse_compress.c +0 -625
- package/src/bsdiff/zstd/lib/compress/hist.c +0 -181
- package/src/bsdiff/zstd/lib/compress/hist.h +0 -75
- package/src/bsdiff/zstd/lib/compress/huf_compress.c +0 -1464
- package/src/bsdiff/zstd/lib/compress/zstd_compress.c +0 -7153
- package/src/bsdiff/zstd/lib/compress/zstd_compress_internal.h +0 -1534
- package/src/bsdiff/zstd/lib/compress/zstd_compress_literals.c +0 -235
- package/src/bsdiff/zstd/lib/compress/zstd_compress_literals.h +0 -39
- package/src/bsdiff/zstd/lib/compress/zstd_compress_sequences.c +0 -442
- package/src/bsdiff/zstd/lib/compress/zstd_compress_sequences.h +0 -54
- package/src/bsdiff/zstd/lib/compress/zstd_compress_superblock.c +0 -688
- package/src/bsdiff/zstd/lib/compress/zstd_compress_superblock.h +0 -32
- package/src/bsdiff/zstd/lib/compress/zstd_cwksp.h +0 -748
- package/src/bsdiff/zstd/lib/compress/zstd_double_fast.c +0 -770
- package/src/bsdiff/zstd/lib/compress/zstd_double_fast.h +0 -50
- package/src/bsdiff/zstd/lib/compress/zstd_fast.c +0 -968
- package/src/bsdiff/zstd/lib/compress/zstd_fast.h +0 -38
- package/src/bsdiff/zstd/lib/compress/zstd_lazy.c +0 -2199
- package/src/bsdiff/zstd/lib/compress/zstd_lazy.h +0 -202
- package/src/bsdiff/zstd/lib/compress/zstd_ldm.c +0 -730
- package/src/bsdiff/zstd/lib/compress/zstd_ldm.h +0 -117
- package/src/bsdiff/zstd/lib/compress/zstd_ldm_geartab.h +0 -106
- package/src/bsdiff/zstd/lib/compress/zstd_opt.c +0 -1576
- package/src/bsdiff/zstd/lib/compress/zstd_opt.h +0 -80
- package/src/bsdiff/zstd/lib/compress/zstdmt_compress.c +0 -1882
- package/src/bsdiff/zstd/lib/compress/zstdmt_compress.h +0 -113
- package/src/bsdiff/zstd/lib/decompress/huf_decompress.c +0 -1944
- package/src/bsdiff/zstd/lib/decompress/huf_decompress_amd64.S +0 -595
- package/src/bsdiff/zstd/lib/decompress/zstd_ddict.c +0 -244
- package/src/bsdiff/zstd/lib/decompress/zstd_ddict.h +0 -44
- package/src/bsdiff/zstd/lib/decompress/zstd_decompress.c +0 -2407
- package/src/bsdiff/zstd/lib/decompress/zstd_decompress_block.c +0 -2215
- package/src/bsdiff/zstd/lib/decompress/zstd_decompress_block.h +0 -73
- package/src/bsdiff/zstd/lib/decompress/zstd_decompress_internal.h +0 -240
- package/src/bsdiff/zstd/lib/deprecated/zbuff.h +0 -214
- package/src/bsdiff/zstd/lib/deprecated/zbuff_common.c +0 -26
- package/src/bsdiff/zstd/lib/deprecated/zbuff_compress.c +0 -167
- package/src/bsdiff/zstd/lib/deprecated/zbuff_decompress.c +0 -77
- package/src/bsdiff/zstd/lib/dictBuilder/cover.c +0 -1261
- package/src/bsdiff/zstd/lib/dictBuilder/cover.h +0 -152
- package/src/bsdiff/zstd/lib/dictBuilder/divsufsort.c +0 -1913
- package/src/bsdiff/zstd/lib/dictBuilder/divsufsort.h +0 -67
- package/src/bsdiff/zstd/lib/dictBuilder/fastcover.c +0 -766
- package/src/bsdiff/zstd/lib/dictBuilder/zdict.c +0 -1133
- package/src/bsdiff/zstd/lib/dll/example/Makefile +0 -48
- package/src/bsdiff/zstd/lib/dll/example/README.md +0 -63
- package/src/bsdiff/zstd/lib/dll/example/build_package.bat +0 -20
- package/src/bsdiff/zstd/lib/dll/example/fullbench-dll.sln +0 -25
- package/src/bsdiff/zstd/lib/dll/example/fullbench-dll.vcxproj +0 -181
- package/src/bsdiff/zstd/lib/legacy/zstd_legacy.h +0 -452
- package/src/bsdiff/zstd/lib/legacy/zstd_v01.c +0 -2127
- package/src/bsdiff/zstd/lib/legacy/zstd_v01.h +0 -94
- package/src/bsdiff/zstd/lib/legacy/zstd_v02.c +0 -3465
- package/src/bsdiff/zstd/lib/legacy/zstd_v02.h +0 -93
- package/src/bsdiff/zstd/lib/legacy/zstd_v03.c +0 -3105
- package/src/bsdiff/zstd/lib/legacy/zstd_v03.h +0 -93
- package/src/bsdiff/zstd/lib/legacy/zstd_v04.c +0 -3598
- package/src/bsdiff/zstd/lib/legacy/zstd_v04.h +0 -142
- package/src/bsdiff/zstd/lib/legacy/zstd_v05.c +0 -4005
- package/src/bsdiff/zstd/lib/legacy/zstd_v05.h +0 -162
- package/src/bsdiff/zstd/lib/legacy/zstd_v06.c +0 -4106
- package/src/bsdiff/zstd/lib/legacy/zstd_v06.h +0 -172
- package/src/bsdiff/zstd/lib/legacy/zstd_v07.c +0 -4490
- package/src/bsdiff/zstd/lib/legacy/zstd_v07.h +0 -187
- package/src/bsdiff/zstd/lib/libzstd.mk +0 -237
- package/src/bsdiff/zstd/lib/libzstd.pc.in +0 -16
- package/src/bsdiff/zstd/lib/module.modulemap +0 -35
- package/src/bsdiff/zstd/lib/zdict.h +0 -474
- package/src/bsdiff/zstd/lib/zstd.h +0 -3089
- package/src/bsdiff/zstd/lib/zstd_errors.h +0 -114
- package/src/bsdiff/zstd/programs/BUCK +0 -44
- package/src/bsdiff/zstd/programs/Makefile +0 -445
- package/src/bsdiff/zstd/programs/README.md +0 -302
- package/src/bsdiff/zstd/programs/benchfn.c +0 -256
- package/src/bsdiff/zstd/programs/benchfn.h +0 -183
- package/src/bsdiff/zstd/programs/benchzstd.c +0 -1264
- package/src/bsdiff/zstd/programs/benchzstd.h +0 -198
- package/src/bsdiff/zstd/programs/datagen.c +0 -186
- package/src/bsdiff/zstd/programs/datagen.h +0 -30
- package/src/bsdiff/zstd/programs/dibio.c +0 -440
- package/src/bsdiff/zstd/programs/dibio.h +0 -39
- package/src/bsdiff/zstd/programs/fileio.c +0 -3470
- package/src/bsdiff/zstd/programs/fileio.h +0 -181
- package/src/bsdiff/zstd/programs/fileio_asyncio.c +0 -663
- package/src/bsdiff/zstd/programs/fileio_asyncio.h +0 -203
- package/src/bsdiff/zstd/programs/fileio_common.h +0 -125
- package/src/bsdiff/zstd/programs/fileio_types.h +0 -86
- package/src/bsdiff/zstd/programs/lorem.c +0 -285
- package/src/bsdiff/zstd/programs/lorem.h +0 -32
- package/src/bsdiff/zstd/programs/platform.h +0 -218
- package/src/bsdiff/zstd/programs/timefn.c +0 -168
- package/src/bsdiff/zstd/programs/timefn.h +0 -70
- package/src/bsdiff/zstd/programs/util.c +0 -1652
- package/src/bsdiff/zstd/programs/util.h +0 -359
- package/src/bsdiff/zstd/programs/windres/verrsrc.h +0 -17
- package/src/bsdiff/zstd/programs/windres/zstd.rc +0 -51
- package/src/bsdiff/zstd/programs/windres/zstd32.res +0 -0
- package/src/bsdiff/zstd/programs/windres/zstd64.res +0 -0
- package/src/bsdiff/zstd/programs/zstd.1 +0 -566
- package/src/bsdiff/zstd/programs/zstd.1.md +0 -695
- package/src/bsdiff/zstd/programs/zstdcli.c +0 -1625
- package/src/bsdiff/zstd/programs/zstdcli_trace.c +0 -172
- package/src/bsdiff/zstd/programs/zstdcli_trace.h +0 -24
- package/src/bsdiff/zstd/programs/zstdgrep +0 -134
- package/src/bsdiff/zstd/programs/zstdgrep.1 +0 -26
- package/src/bsdiff/zstd/programs/zstdgrep.1.md +0 -30
- package/src/bsdiff/zstd/programs/zstdless +0 -8
- package/src/bsdiff/zstd/programs/zstdless.1 +0 -14
- package/src/bsdiff/zstd/programs/zstdless.1.md +0 -16
- package/src/bsdiff/zstd/tests/DEPRECATED-test-zstd-speed.py +0 -378
- package/src/bsdiff/zstd/tests/Makefile +0 -477
- package/src/bsdiff/zstd/tests/README.md +0 -184
- package/src/bsdiff/zstd/tests/automated_benchmarking.py +0 -326
- package/src/bsdiff/zstd/tests/bigdict.c +0 -128
- package/src/bsdiff/zstd/tests/checkTag.c +0 -65
- package/src/bsdiff/zstd/tests/check_size.py +0 -31
- package/src/bsdiff/zstd/tests/cli-tests/README.md +0 -258
- package/src/bsdiff/zstd/tests/cli-tests/basic/args.sh +0 -10
- package/src/bsdiff/zstd/tests/cli-tests/basic/args.sh.exit +0 -1
- package/src/bsdiff/zstd/tests/cli-tests/basic/args.sh.stderr.glob +0 -28
- package/src/bsdiff/zstd/tests/cli-tests/basic/help.sh +0 -10
- package/src/bsdiff/zstd/tests/cli-tests/basic/help.sh.stdout.glob +0 -34
- package/src/bsdiff/zstd/tests/cli-tests/basic/memlimit.sh +0 -40
- package/src/bsdiff/zstd/tests/cli-tests/basic/memlimit.sh.stderr.exact +0 -13
- package/src/bsdiff/zstd/tests/cli-tests/basic/memlimit.sh.stdout.exact +0 -13
- package/src/bsdiff/zstd/tests/cli-tests/basic/output_dir.sh +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/basic/output_dir.sh.stderr.exact +0 -2
- package/src/bsdiff/zstd/tests/cli-tests/basic/output_dir.sh.stdout.exact +0 -2
- package/src/bsdiff/zstd/tests/cli-tests/basic/version.sh +0 -6
- package/src/bsdiff/zstd/tests/cli-tests/basic/version.sh.stdout.glob +0 -2
- package/src/bsdiff/zstd/tests/cli-tests/bin/cmp_size +0 -44
- package/src/bsdiff/zstd/tests/cli-tests/bin/datagen +0 -3
- package/src/bsdiff/zstd/tests/cli-tests/bin/die +0 -4
- package/src/bsdiff/zstd/tests/cli-tests/bin/println +0 -2
- package/src/bsdiff/zstd/tests/cli-tests/bin/zstd +0 -9
- package/src/bsdiff/zstd/tests/cli-tests/bin/zstdgrep +0 -2
- package/src/bsdiff/zstd/tests/cli-tests/bin/zstdless +0 -2
- package/src/bsdiff/zstd/tests/cli-tests/cltools/setup +0 -6
- package/src/bsdiff/zstd/tests/cli-tests/cltools/zstdgrep.sh +0 -8
- package/src/bsdiff/zstd/tests/cli-tests/cltools/zstdgrep.sh.exit +0 -1
- package/src/bsdiff/zstd/tests/cli-tests/cltools/zstdgrep.sh.stderr.exact +0 -1
- package/src/bsdiff/zstd/tests/cli-tests/cltools/zstdgrep.sh.stdout.glob +0 -4
- package/src/bsdiff/zstd/tests/cli-tests/cltools/zstdless.sh +0 -10
- package/src/bsdiff/zstd/tests/cli-tests/cltools/zstdless.sh.stderr.exact +0 -2
- package/src/bsdiff/zstd/tests/cli-tests/cltools/zstdless.sh.stdout.glob +0 -5
- package/src/bsdiff/zstd/tests/cli-tests/common/format.sh +0 -19
- package/src/bsdiff/zstd/tests/cli-tests/common/mtime.sh +0 -13
- package/src/bsdiff/zstd/tests/cli-tests/common/permissions.sh +0 -18
- package/src/bsdiff/zstd/tests/cli-tests/common/platform.sh +0 -37
- package/src/bsdiff/zstd/tests/cli-tests/compression/adapt.sh +0 -14
- package/src/bsdiff/zstd/tests/cli-tests/compression/basic.sh +0 -36
- package/src/bsdiff/zstd/tests/cli-tests/compression/compress-literals.sh +0 -10
- package/src/bsdiff/zstd/tests/cli-tests/compression/format.sh +0 -16
- package/src/bsdiff/zstd/tests/cli-tests/compression/golden.sh +0 -16
- package/src/bsdiff/zstd/tests/cli-tests/compression/gzip-compat.sh +0 -17
- package/src/bsdiff/zstd/tests/cli-tests/compression/levels.sh +0 -62
- package/src/bsdiff/zstd/tests/cli-tests/compression/levels.sh.stderr.exact +0 -69
- package/src/bsdiff/zstd/tests/cli-tests/compression/long-distance-matcher.sh +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/compression/multi-threaded.sh +0 -15
- package/src/bsdiff/zstd/tests/cli-tests/compression/multi-threaded.sh.stderr.exact +0 -11
- package/src/bsdiff/zstd/tests/cli-tests/compression/multiple-files.sh +0 -21
- package/src/bsdiff/zstd/tests/cli-tests/compression/multiple-files.sh.stdout.exact +0 -12
- package/src/bsdiff/zstd/tests/cli-tests/compression/row-match-finder.sh +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/compression/setup +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/compression/stream-size.sh +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/compression/verbose-wlog.sh +0 -11
- package/src/bsdiff/zstd/tests/cli-tests/compression/verbose-wlog.sh.stderr.glob +0 -5
- package/src/bsdiff/zstd/tests/cli-tests/compression/verbose-wlog.sh.stdout.glob +0 -5
- package/src/bsdiff/zstd/tests/cli-tests/compression/window-resize.sh +0 -9
- package/src/bsdiff/zstd/tests/cli-tests/compression/window-resize.sh.stderr.ignore +0 -0
- package/src/bsdiff/zstd/tests/cli-tests/compression/window-resize.sh.stdout.glob +0 -3
- package/src/bsdiff/zstd/tests/cli-tests/decompression/detectErrors.sh +0 -11
- package/src/bsdiff/zstd/tests/cli-tests/decompression/golden.sh +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/decompression/pass-through.sh +0 -57
- package/src/bsdiff/zstd/tests/cli-tests/decompression/pass-through.sh.stderr.exact +0 -11
- package/src/bsdiff/zstd/tests/cli-tests/decompression/pass-through.sh.stdout.exact +0 -25
- package/src/bsdiff/zstd/tests/cli-tests/dict-builder/empty-input.sh +0 -9
- package/src/bsdiff/zstd/tests/cli-tests/dict-builder/empty-input.sh.stderr.exact +0 -1
- package/src/bsdiff/zstd/tests/cli-tests/dict-builder/no-inputs.sh +0 -3
- package/src/bsdiff/zstd/tests/cli-tests/dict-builder/no-inputs.sh.exit +0 -1
- package/src/bsdiff/zstd/tests/cli-tests/dict-builder/no-inputs.sh.stderr.exact +0 -5
- package/src/bsdiff/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh +0 -29
- package/src/bsdiff/zstd/tests/cli-tests/dictionaries/dictionary-mismatch.sh.stderr.exact +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/dictionaries/golden.sh +0 -9
- package/src/bsdiff/zstd/tests/cli-tests/dictionaries/setup +0 -6
- package/src/bsdiff/zstd/tests/cli-tests/dictionaries/setup_once +0 -24
- package/src/bsdiff/zstd/tests/cli-tests/file-handling/directory-mirror.sh +0 -49
- package/src/bsdiff/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stderr.exact +0 -0
- package/src/bsdiff/zstd/tests/cli-tests/file-handling/directory-mirror.sh.stdout.exact +0 -0
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh +0 -12
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact +0 -26
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh +0 -9
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-file-to-file.sh.stderr.exact +0 -42
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh +0 -8
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-file-to-stdout.sh.stderr.exact +0 -24
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh +0 -8
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-stdin-to-file.sh.stderr.exact +0 -24
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh +0 -8
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/compress-stdin-to-stdout.sh.stderr.exact +0 -18
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh +0 -8
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/decompress-file-to-file.sh.stderr.exact +0 -38
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/decompress-file-to-stdout.sh.stderr.exact +0 -18
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/decompress-stdin-to-file.sh.stderr.exact +0 -20
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh +0 -7
- package/src/bsdiff/zstd/tests/cli-tests/file-stat/decompress-stdin-to-stdout.sh.stderr.exact +0 -14
- package/src/bsdiff/zstd/tests/cli-tests/progress/no-progress.sh +0 -46
- package/src/bsdiff/zstd/tests/cli-tests/progress/no-progress.sh.stderr.glob +0 -96
- package/src/bsdiff/zstd/tests/cli-tests/progress/progress.sh +0 -41
- package/src/bsdiff/zstd/tests/cli-tests/progress/progress.sh.stderr.glob +0 -62
- package/src/bsdiff/zstd/tests/cli-tests/run.py +0 -731
- package/src/bsdiff/zstd/tests/cli-tests/zstd-symlinks/setup +0 -6
- package/src/bsdiff/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh +0 -12
- package/src/bsdiff/zstd/tests/cli-tests/zstd-symlinks/zstdcat.sh.stdout.exact +0 -8
- package/src/bsdiff/zstd/tests/datagencli.c +0 -149
- package/src/bsdiff/zstd/tests/decodecorpus.c +0 -1936
- package/src/bsdiff/zstd/tests/dict-files/zero-weight-dict +0 -0
- package/src/bsdiff/zstd/tests/external_matchfinder.c +0 -140
- package/src/bsdiff/zstd/tests/external_matchfinder.h +0 -39
- package/src/bsdiff/zstd/tests/fullbench.c +0 -980
- package/src/bsdiff/zstd/tests/fuzz/Makefile +0 -277
- package/src/bsdiff/zstd/tests/fuzz/README.md +0 -161
- package/src/bsdiff/zstd/tests/fuzz/block_decompress.c +0 -53
- package/src/bsdiff/zstd/tests/fuzz/block_round_trip.c +0 -103
- package/src/bsdiff/zstd/tests/fuzz/decompress_cross_format.c +0 -130
- package/src/bsdiff/zstd/tests/fuzz/decompress_dstSize_tooSmall.c +0 -74
- package/src/bsdiff/zstd/tests/fuzz/dictionary_decompress.c +0 -77
- package/src/bsdiff/zstd/tests/fuzz/dictionary_loader.c +0 -106
- package/src/bsdiff/zstd/tests/fuzz/dictionary_round_trip.c +0 -155
- package/src/bsdiff/zstd/tests/fuzz/dictionary_stream_round_trip.c +0 -209
- package/src/bsdiff/zstd/tests/fuzz/fse_read_ncount.c +0 -100
- package/src/bsdiff/zstd/tests/fuzz/fuzz.h +0 -57
- package/src/bsdiff/zstd/tests/fuzz/fuzz.py +0 -911
- package/src/bsdiff/zstd/tests/fuzz/fuzz_data_producer.c +0 -95
- package/src/bsdiff/zstd/tests/fuzz/fuzz_data_producer.h +0 -66
- package/src/bsdiff/zstd/tests/fuzz/fuzz_helpers.c +0 -48
- package/src/bsdiff/zstd/tests/fuzz/fuzz_helpers.h +0 -81
- package/src/bsdiff/zstd/tests/fuzz/fuzz_third_party_seq_prod.h +0 -116
- package/src/bsdiff/zstd/tests/fuzz/generate_sequences.c +0 -88
- package/src/bsdiff/zstd/tests/fuzz/huf_decompress.c +0 -68
- package/src/bsdiff/zstd/tests/fuzz/huf_round_trip.c +0 -137
- package/src/bsdiff/zstd/tests/fuzz/raw_dictionary_round_trip.c +0 -119
- package/src/bsdiff/zstd/tests/fuzz/regression_driver.c +0 -90
- package/src/bsdiff/zstd/tests/fuzz/seekable_roundtrip.c +0 -88
- package/src/bsdiff/zstd/tests/fuzz/seq_prod_fuzz_example/Makefile +0 -16
- package/src/bsdiff/zstd/tests/fuzz/seq_prod_fuzz_example/README.md +0 -12
- package/src/bsdiff/zstd/tests/fuzz/seq_prod_fuzz_example/example_seq_prod.c +0 -52
- package/src/bsdiff/zstd/tests/fuzz/sequence_compression_api.c +0 -381
- package/src/bsdiff/zstd/tests/fuzz/simple_compress.c +0 -60
- package/src/bsdiff/zstd/tests/fuzz/simple_decompress.c +0 -59
- package/src/bsdiff/zstd/tests/fuzz/simple_round_trip.c +0 -182
- package/src/bsdiff/zstd/tests/fuzz/stream_decompress.c +0 -119
- package/src/bsdiff/zstd/tests/fuzz/stream_round_trip.c +0 -218
- package/src/bsdiff/zstd/tests/fuzz/zstd_frame_info.c +0 -43
- package/src/bsdiff/zstd/tests/fuzz/zstd_helpers.c +0 -207
- package/src/bsdiff/zstd/tests/fuzz/zstd_helpers.h +0 -56
- package/src/bsdiff/zstd/tests/fuzzer.c +0 -4933
- package/src/bsdiff/zstd/tests/golden-compression/PR-3517-block-splitter-corruption-test +0 -1
- package/src/bsdiff/zstd/tests/golden-compression/http +0 -1
- package/src/bsdiff/zstd/tests/golden-compression/huffman-compressed-larger +0 -0
- package/src/bsdiff/zstd/tests/golden-compression/large-literal-and-match-lengths +0 -0
- package/src/bsdiff/zstd/tests/golden-decompression/block-128k.zst +0 -0
- package/src/bsdiff/zstd/tests/golden-decompression/empty-block.zst +0 -0
- package/src/bsdiff/zstd/tests/golden-decompression/rle-first-block.zst +0 -0
- package/src/bsdiff/zstd/tests/golden-decompression/zeroSeq_2B.zst +0 -0
- package/src/bsdiff/zstd/tests/golden-decompression-errors/off0.bin.zst +0 -0
- package/src/bsdiff/zstd/tests/golden-decompression-errors/zeroSeq_extraneous.zst +0 -0
- package/src/bsdiff/zstd/tests/golden-dictionaries/http-dict-missing-symbols +0 -0
- package/src/bsdiff/zstd/tests/gzip/Makefile +0 -45
- package/src/bsdiff/zstd/tests/gzip/gzip-env.sh +0 -46
- package/src/bsdiff/zstd/tests/gzip/helin-segv.sh +0 -31
- package/src/bsdiff/zstd/tests/gzip/help-version.sh +0 -270
- package/src/bsdiff/zstd/tests/gzip/hufts-segv.gz +0 -0
- package/src/bsdiff/zstd/tests/gzip/hufts.sh +0 -34
- package/src/bsdiff/zstd/tests/gzip/init.cfg +0 -5
- package/src/bsdiff/zstd/tests/gzip/init.sh +0 -616
- package/src/bsdiff/zstd/tests/gzip/keep.sh +0 -51
- package/src/bsdiff/zstd/tests/gzip/list.sh +0 -31
- package/src/bsdiff/zstd/tests/gzip/memcpy-abuse.sh +0 -34
- package/src/bsdiff/zstd/tests/gzip/mixed.sh +0 -68
- package/src/bsdiff/zstd/tests/gzip/null-suffix-clobber.sh +0 -35
- package/src/bsdiff/zstd/tests/gzip/stdin.sh +0 -31
- package/src/bsdiff/zstd/tests/gzip/test-driver.sh +0 -150
- package/src/bsdiff/zstd/tests/gzip/trailing-nul.sh +0 -37
- package/src/bsdiff/zstd/tests/gzip/unpack-invalid.sh +0 -36
- package/src/bsdiff/zstd/tests/gzip/z-suffix.sh +0 -30
- package/src/bsdiff/zstd/tests/gzip/zdiff.sh +0 -48
- package/src/bsdiff/zstd/tests/gzip/zgrep-context.sh +0 -47
- package/src/bsdiff/zstd/tests/gzip/zgrep-f.sh +0 -43
- package/src/bsdiff/zstd/tests/gzip/zgrep-signal.sh +0 -64
- package/src/bsdiff/zstd/tests/gzip/znew-k.sh +0 -40
- package/src/bsdiff/zstd/tests/invalidDictionaries.c +0 -61
- package/src/bsdiff/zstd/tests/legacy.c +0 -260
- package/src/bsdiff/zstd/tests/libzstd_builds.sh +0 -104
- package/src/bsdiff/zstd/tests/longmatch.c +0 -102
- package/src/bsdiff/zstd/tests/loremOut.c +0 -50
- package/src/bsdiff/zstd/tests/loremOut.h +0 -15
- package/src/bsdiff/zstd/tests/paramgrill.c +0 -2966
- package/src/bsdiff/zstd/tests/playTests.sh +0 -1928
- package/src/bsdiff/zstd/tests/poolTests.c +0 -271
- package/src/bsdiff/zstd/tests/rateLimiter.py +0 -41
- package/src/bsdiff/zstd/tests/regression/Makefile +0 -60
- package/src/bsdiff/zstd/tests/regression/README.md +0 -28
- package/src/bsdiff/zstd/tests/regression/config.c +0 -404
- package/src/bsdiff/zstd/tests/regression/config.h +0 -91
- package/src/bsdiff/zstd/tests/regression/data.c +0 -631
- package/src/bsdiff/zstd/tests/regression/data.h +0 -121
- package/src/bsdiff/zstd/tests/regression/levels.h +0 -59
- package/src/bsdiff/zstd/tests/regression/method.c +0 -701
- package/src/bsdiff/zstd/tests/regression/method.h +0 -65
- package/src/bsdiff/zstd/tests/regression/result.c +0 -28
- package/src/bsdiff/zstd/tests/regression/result.h +0 -103
- package/src/bsdiff/zstd/tests/regression/results.csv +0 -1480
- package/src/bsdiff/zstd/tests/regression/test.c +0 -362
- package/src/bsdiff/zstd/tests/roundTripCrash.c +0 -241
- package/src/bsdiff/zstd/tests/seqgen.c +0 -260
- package/src/bsdiff/zstd/tests/seqgen.h +0 -58
- package/src/bsdiff/zstd/tests/test-license.py +0 -156
- package/src/bsdiff/zstd/tests/test-variants.sh +0 -115
- package/src/bsdiff/zstd/tests/test-zstd-versions.py +0 -308
- package/src/bsdiff/zstd/tests/zstreamtest.c +0 -3407
- package/src/bsdiff/zstd/zlibWrapper/BUCK +0 -22
- package/src/bsdiff/zstd/zlibWrapper/Makefile +0 -120
- package/src/bsdiff/zstd/zlibWrapper/README.md +0 -163
- package/src/bsdiff/zstd/zlibWrapper/examples/example.c +0 -598
- package/src/bsdiff/zstd/zlibWrapper/examples/example_original.c +0 -599
- package/src/bsdiff/zstd/zlibWrapper/examples/fitblk.c +0 -254
- package/src/bsdiff/zstd/zlibWrapper/examples/fitblk_original.c +0 -233
- package/src/bsdiff/zstd/zlibWrapper/examples/minigzip.c +0 -605
- package/src/bsdiff/zstd/zlibWrapper/examples/zwrapbench.c +0 -1018
- package/src/bsdiff/zstd/zlibWrapper/gzclose.c +0 -26
- package/src/bsdiff/zstd/zlibWrapper/gzcompatibility.h +0 -68
- package/src/bsdiff/zstd/zlibWrapper/gzguts.h +0 -229
- package/src/bsdiff/zstd/zlibWrapper/gzlib.c +0 -587
- package/src/bsdiff/zstd/zlibWrapper/gzread.c +0 -637
- package/src/bsdiff/zstd/zlibWrapper/gzwrite.c +0 -631
- package/src/bsdiff/zstd/zlibWrapper/zstd_zlibwrapper.c +0 -1200
- package/src/bsdiff/zstd/zlibWrapper/zstd_zlibwrapper.h +0 -91
- package/src/objc/build/objcWrapper.o +0 -0
- package/src/objc/objcWrapper.m +0 -1380
- package/src/zig/build/index.js +0 -782
- package/src/zig/build/libObjcWrapper.a +0 -0
- package/src/zig/build.zig +0 -29
- package/src/zig/macos/application.zig +0 -6
- package/src/zig/macos/objc.zig +0 -123
- package/src/zig/macos/tray.zig +0 -102
- package/src/zig/macos/webview.zig +0 -693
- package/src/zig/macos/window.zig +0 -189
- package/src/zig/main.zig +0 -16
- package/src/zig/rpc/pipesin.zig +0 -202
- package/src/zig/rpc/rpc.zig +0 -19
- package/src/zig/rpc/schema/handlers.zig +0 -402
- package/src/zig/rpc/schema/request.zig +0 -59
- package/src/zig/rpc/schema/schema.zig +0 -412
- package/src/zig/rpc/stdin.zig +0 -112
- package/src/zig/rpc/stdout.zig +0 -106
- package/src/zig/rpc/types.zig +0 -41
- package/src/zig/utils.zig +0 -49
- package/src/zig/zig-out/bin/webview +0 -0
|
@@ -1,731 +0,0 @@
|
|
|
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 argparse
|
|
13
|
-
import contextlib
|
|
14
|
-
import copy
|
|
15
|
-
import fnmatch
|
|
16
|
-
import os
|
|
17
|
-
import shutil
|
|
18
|
-
import subprocess
|
|
19
|
-
import sys
|
|
20
|
-
import tempfile
|
|
21
|
-
import typing
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
ZSTD_SYMLINKS = [
|
|
25
|
-
"zstd",
|
|
26
|
-
"zstdmt",
|
|
27
|
-
"unzstd",
|
|
28
|
-
"zstdcat",
|
|
29
|
-
"zcat",
|
|
30
|
-
"gzip",
|
|
31
|
-
"gunzip",
|
|
32
|
-
"gzcat",
|
|
33
|
-
"lzma",
|
|
34
|
-
"unlzma",
|
|
35
|
-
"xz",
|
|
36
|
-
"unxz",
|
|
37
|
-
"lz4",
|
|
38
|
-
"unlz4",
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
EXCLUDED_DIRS = {
|
|
43
|
-
"bin",
|
|
44
|
-
"common",
|
|
45
|
-
"scratch",
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
EXCLUDED_BASENAMES = {
|
|
50
|
-
"setup",
|
|
51
|
-
"setup_once",
|
|
52
|
-
"teardown",
|
|
53
|
-
"teardown_once",
|
|
54
|
-
"README.md",
|
|
55
|
-
"run.py",
|
|
56
|
-
".gitignore",
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
EXCLUDED_SUFFIXES = [
|
|
60
|
-
".exact",
|
|
61
|
-
".glob",
|
|
62
|
-
".ignore",
|
|
63
|
-
".exit",
|
|
64
|
-
]
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
def exclude_dir(dirname: str) -> bool:
|
|
68
|
-
"""
|
|
69
|
-
Should files under the directory :dirname: be excluded from the test runner?
|
|
70
|
-
"""
|
|
71
|
-
if dirname in EXCLUDED_DIRS:
|
|
72
|
-
return True
|
|
73
|
-
return False
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def exclude_file(filename: str) -> bool:
|
|
77
|
-
"""Should the file :filename: be excluded from the test runner?"""
|
|
78
|
-
if filename in EXCLUDED_BASENAMES:
|
|
79
|
-
return True
|
|
80
|
-
for suffix in EXCLUDED_SUFFIXES:
|
|
81
|
-
if filename.endswith(suffix):
|
|
82
|
-
return True
|
|
83
|
-
return False
|
|
84
|
-
|
|
85
|
-
def read_file(filename: str) -> bytes:
|
|
86
|
-
"""Reads the file :filename: and returns the contents as bytes."""
|
|
87
|
-
with open(filename, "rb") as f:
|
|
88
|
-
return f.read()
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
def diff(a: bytes, b: bytes) -> str:
|
|
92
|
-
"""Returns a diff between two different byte-strings :a: and :b:."""
|
|
93
|
-
assert a != b
|
|
94
|
-
with tempfile.NamedTemporaryFile("wb") as fa:
|
|
95
|
-
fa.write(a)
|
|
96
|
-
fa.flush()
|
|
97
|
-
with tempfile.NamedTemporaryFile("wb") as fb:
|
|
98
|
-
fb.write(b)
|
|
99
|
-
fb.flush()
|
|
100
|
-
|
|
101
|
-
diff_bytes = subprocess.run(["diff", fa.name, fb.name], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout
|
|
102
|
-
return diff_bytes.decode("utf8")
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
def pop_line(data: bytes) -> typing.Tuple[typing.Optional[bytes], bytes]:
|
|
106
|
-
"""
|
|
107
|
-
Pop the first line from :data: and returns the first line and the remainder
|
|
108
|
-
of the data as a tuple. If :data: is empty, returns :(None, data):. Otherwise
|
|
109
|
-
the first line always ends in a :\n:, even if it is the last line and :data:
|
|
110
|
-
doesn't end in :\n:.
|
|
111
|
-
"""
|
|
112
|
-
NEWLINE = b"\n"
|
|
113
|
-
|
|
114
|
-
if data == b'':
|
|
115
|
-
return (None, data)
|
|
116
|
-
|
|
117
|
-
parts = data.split(NEWLINE, maxsplit=1)
|
|
118
|
-
line = parts[0] + NEWLINE
|
|
119
|
-
if len(parts) == 1:
|
|
120
|
-
return line, b''
|
|
121
|
-
|
|
122
|
-
return line, parts[1]
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
def glob_line_matches(actual: bytes, expect: bytes) -> bool:
|
|
126
|
-
"""
|
|
127
|
-
Does the `actual` line match the expected glob line `expect`?
|
|
128
|
-
"""
|
|
129
|
-
return fnmatch.fnmatchcase(actual.strip(), expect.strip())
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
def glob_diff(actual: bytes, expect: bytes) -> bytes:
|
|
133
|
-
"""
|
|
134
|
-
Returns None if the :actual: content matches the expected glob :expect:,
|
|
135
|
-
otherwise returns the diff bytes.
|
|
136
|
-
"""
|
|
137
|
-
diff = b''
|
|
138
|
-
actual_line, actual = pop_line(actual)
|
|
139
|
-
expect_line, expect = pop_line(expect)
|
|
140
|
-
while True:
|
|
141
|
-
# Handle end of file conditions - allow extra newlines
|
|
142
|
-
while expect_line is None and actual_line == b"\n":
|
|
143
|
-
actual_line, actual = pop_line(actual)
|
|
144
|
-
while actual_line is None and expect_line == b"\n":
|
|
145
|
-
expect_line, expect = pop_line(expect)
|
|
146
|
-
|
|
147
|
-
if expect_line is None and actual_line is None:
|
|
148
|
-
if diff == b'':
|
|
149
|
-
return None
|
|
150
|
-
return diff
|
|
151
|
-
elif expect_line is None:
|
|
152
|
-
diff += b"---\n"
|
|
153
|
-
while actual_line != None:
|
|
154
|
-
diff += b"> "
|
|
155
|
-
diff += actual_line
|
|
156
|
-
actual_line, actual = pop_line(actual)
|
|
157
|
-
return diff
|
|
158
|
-
elif actual_line is None:
|
|
159
|
-
diff += b"---\n"
|
|
160
|
-
while expect_line != None:
|
|
161
|
-
diff += b"< "
|
|
162
|
-
diff += expect_line
|
|
163
|
-
expect_line, expect = pop_line(expect)
|
|
164
|
-
return diff
|
|
165
|
-
|
|
166
|
-
assert expect_line is not None
|
|
167
|
-
assert actual_line is not None
|
|
168
|
-
|
|
169
|
-
if expect_line == b'...\n':
|
|
170
|
-
next_expect_line, expect = pop_line(expect)
|
|
171
|
-
if next_expect_line is None:
|
|
172
|
-
if diff == b'':
|
|
173
|
-
return None
|
|
174
|
-
return diff
|
|
175
|
-
while not glob_line_matches(actual_line, next_expect_line):
|
|
176
|
-
actual_line, actual = pop_line(actual)
|
|
177
|
-
if actual_line is None:
|
|
178
|
-
diff += b"---\n"
|
|
179
|
-
diff += b"< "
|
|
180
|
-
diff += next_expect_line
|
|
181
|
-
return diff
|
|
182
|
-
expect_line = next_expect_line
|
|
183
|
-
continue
|
|
184
|
-
|
|
185
|
-
if not glob_line_matches(actual_line, expect_line):
|
|
186
|
-
diff += b'---\n'
|
|
187
|
-
diff += b'< ' + expect_line
|
|
188
|
-
diff += b'> ' + actual_line
|
|
189
|
-
|
|
190
|
-
actual_line, actual = pop_line(actual)
|
|
191
|
-
expect_line, expect = pop_line(expect)
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
class Options:
|
|
195
|
-
"""Options configuring how to run a :TestCase:."""
|
|
196
|
-
def __init__(
|
|
197
|
-
self,
|
|
198
|
-
env: typing.Dict[str, str],
|
|
199
|
-
timeout: typing.Optional[int],
|
|
200
|
-
verbose: bool,
|
|
201
|
-
preserve: bool,
|
|
202
|
-
scratch_dir: str,
|
|
203
|
-
test_dir: str,
|
|
204
|
-
set_exact_output: bool,
|
|
205
|
-
) -> None:
|
|
206
|
-
self.env = env
|
|
207
|
-
self.timeout = timeout
|
|
208
|
-
self.verbose = verbose
|
|
209
|
-
self.preserve = preserve
|
|
210
|
-
self.scratch_dir = scratch_dir
|
|
211
|
-
self.test_dir = test_dir
|
|
212
|
-
self.set_exact_output = set_exact_output
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
class TestCase:
|
|
216
|
-
"""
|
|
217
|
-
Logic and state related to running a single test case.
|
|
218
|
-
|
|
219
|
-
1. Initialize the test case.
|
|
220
|
-
2. Launch the test case with :TestCase.launch():.
|
|
221
|
-
This will start the test execution in a subprocess, but
|
|
222
|
-
not wait for completion. So you could launch multiple test
|
|
223
|
-
cases in parallel. This will now print any test output.
|
|
224
|
-
3. Analyze the results with :TestCase.analyze():. This will
|
|
225
|
-
join the test subprocess, check the results against the
|
|
226
|
-
expectations, and print the results to stdout.
|
|
227
|
-
|
|
228
|
-
:TestCase.run(): is also provided which combines the launch & analyze
|
|
229
|
-
steps for single-threaded use-cases.
|
|
230
|
-
|
|
231
|
-
All other methods, prefixed with _, are private helper functions.
|
|
232
|
-
"""
|
|
233
|
-
def __init__(self, test_filename: str, options: Options) -> None:
|
|
234
|
-
"""
|
|
235
|
-
Initialize the :TestCase: for the test located in :test_filename:
|
|
236
|
-
with the given :options:.
|
|
237
|
-
"""
|
|
238
|
-
self._opts = options
|
|
239
|
-
self._test_file = test_filename
|
|
240
|
-
self._test_name = os.path.normpath(
|
|
241
|
-
os.path.relpath(test_filename, start=self._opts.test_dir)
|
|
242
|
-
)
|
|
243
|
-
self._success = {}
|
|
244
|
-
self._message = {}
|
|
245
|
-
self._test_stdin = None
|
|
246
|
-
self._scratch_dir = os.path.abspath(os.path.join(self._opts.scratch_dir, self._test_name))
|
|
247
|
-
|
|
248
|
-
@property
|
|
249
|
-
def name(self) -> str:
|
|
250
|
-
"""Returns the unique name for the test."""
|
|
251
|
-
return self._test_name
|
|
252
|
-
|
|
253
|
-
def launch(self) -> None:
|
|
254
|
-
"""
|
|
255
|
-
Launch the test case as a subprocess, but do not block on completion.
|
|
256
|
-
This allows users to run multiple tests in parallel. Results aren't yet
|
|
257
|
-
printed out.
|
|
258
|
-
"""
|
|
259
|
-
self._launch_test()
|
|
260
|
-
|
|
261
|
-
def analyze(self) -> bool:
|
|
262
|
-
"""
|
|
263
|
-
Must be called after :TestCase.launch():. Joins the test subprocess and
|
|
264
|
-
checks the results against expectations. Finally prints the results to
|
|
265
|
-
stdout and returns the success.
|
|
266
|
-
"""
|
|
267
|
-
self._join_test()
|
|
268
|
-
self._check_exit()
|
|
269
|
-
self._check_stderr()
|
|
270
|
-
self._check_stdout()
|
|
271
|
-
self._analyze_results()
|
|
272
|
-
return self._succeeded
|
|
273
|
-
|
|
274
|
-
def run(self) -> bool:
|
|
275
|
-
"""Shorthand for combining both :TestCase.launch(): and :TestCase.analyze():."""
|
|
276
|
-
self.launch()
|
|
277
|
-
return self.analyze()
|
|
278
|
-
|
|
279
|
-
def _log(self, *args, **kwargs) -> None:
|
|
280
|
-
"""Logs test output."""
|
|
281
|
-
print(file=sys.stdout, *args, **kwargs)
|
|
282
|
-
|
|
283
|
-
def _vlog(self, *args, **kwargs) -> None:
|
|
284
|
-
"""Logs verbose test output."""
|
|
285
|
-
if self._opts.verbose:
|
|
286
|
-
print(file=sys.stdout, *args, **kwargs)
|
|
287
|
-
|
|
288
|
-
def _test_environment(self) -> typing.Dict[str, str]:
|
|
289
|
-
"""
|
|
290
|
-
Returns the environment to be used for the
|
|
291
|
-
test subprocess.
|
|
292
|
-
"""
|
|
293
|
-
# We want to omit ZSTD cli flags so tests will be consistent across environments
|
|
294
|
-
env = {k: v for k, v in os.environ.items() if not k.startswith("ZSTD")}
|
|
295
|
-
for k, v in self._opts.env.items():
|
|
296
|
-
self._vlog(f"${k}='{v}'")
|
|
297
|
-
env[k] = v
|
|
298
|
-
return env
|
|
299
|
-
|
|
300
|
-
def _launch_test(self) -> None:
|
|
301
|
-
"""Launch the test subprocess, but do not join it."""
|
|
302
|
-
args = [os.path.abspath(self._test_file)]
|
|
303
|
-
stdin_name = f"{self._test_file}.stdin"
|
|
304
|
-
if os.path.exists(stdin_name):
|
|
305
|
-
self._test_stdin = open(stdin_name, "rb")
|
|
306
|
-
stdin = self._test_stdin
|
|
307
|
-
else:
|
|
308
|
-
stdin = subprocess.DEVNULL
|
|
309
|
-
cwd = self._scratch_dir
|
|
310
|
-
env = self._test_environment()
|
|
311
|
-
self._test_process = subprocess.Popen(
|
|
312
|
-
args=args,
|
|
313
|
-
stdin=stdin,
|
|
314
|
-
cwd=cwd,
|
|
315
|
-
env=env,
|
|
316
|
-
stderr=subprocess.PIPE,
|
|
317
|
-
stdout=subprocess.PIPE
|
|
318
|
-
)
|
|
319
|
-
|
|
320
|
-
def _join_test(self) -> None:
|
|
321
|
-
"""Join the test process and save stderr, stdout, and the exit code."""
|
|
322
|
-
(stdout, stderr) = self._test_process.communicate(timeout=self._opts.timeout)
|
|
323
|
-
self._output = {}
|
|
324
|
-
self._output["stdout"] = stdout
|
|
325
|
-
self._output["stderr"] = stderr
|
|
326
|
-
self._exit_code = self._test_process.returncode
|
|
327
|
-
self._test_process = None
|
|
328
|
-
if self._test_stdin is not None:
|
|
329
|
-
self._test_stdin.close()
|
|
330
|
-
self._test_stdin = None
|
|
331
|
-
|
|
332
|
-
def _check_output_exact(self, out_name: str, expected: bytes, exact_name: str) -> None:
|
|
333
|
-
"""
|
|
334
|
-
Check the output named :out_name: for an exact match against the :expected: content.
|
|
335
|
-
Saves the success and message.
|
|
336
|
-
"""
|
|
337
|
-
check_name = f"check_{out_name}"
|
|
338
|
-
actual = self._output[out_name]
|
|
339
|
-
if actual == expected:
|
|
340
|
-
self._success[check_name] = True
|
|
341
|
-
self._message[check_name] = f"{out_name} matches!"
|
|
342
|
-
else:
|
|
343
|
-
self._success[check_name] = False
|
|
344
|
-
self._message[check_name] = f"{out_name} does not match!\n> diff expected actual\n{diff(expected, actual)}"
|
|
345
|
-
|
|
346
|
-
if self._opts.set_exact_output:
|
|
347
|
-
with open(exact_name, "wb") as f:
|
|
348
|
-
f.write(actual)
|
|
349
|
-
|
|
350
|
-
def _check_output_glob(self, out_name: str, expected: bytes) -> None:
|
|
351
|
-
"""
|
|
352
|
-
Check the output named :out_name: for a glob match against the :expected: glob.
|
|
353
|
-
Saves the success and message.
|
|
354
|
-
"""
|
|
355
|
-
check_name = f"check_{out_name}"
|
|
356
|
-
actual = self._output[out_name]
|
|
357
|
-
diff = glob_diff(actual, expected)
|
|
358
|
-
if diff is None:
|
|
359
|
-
self._success[check_name] = True
|
|
360
|
-
self._message[check_name] = f"{out_name} matches!"
|
|
361
|
-
else:
|
|
362
|
-
utf8_diff = diff.decode('utf8')
|
|
363
|
-
self._success[check_name] = False
|
|
364
|
-
self._message[check_name] = f"{out_name} does not match!\n> diff expected actual\n{utf8_diff}"
|
|
365
|
-
|
|
366
|
-
def _check_output(self, out_name: str) -> None:
|
|
367
|
-
"""
|
|
368
|
-
Checks the output named :out_name: for a match against the expectation.
|
|
369
|
-
We check for a .exact, .glob, and a .ignore file. If none are found we
|
|
370
|
-
expect that the output should be empty.
|
|
371
|
-
|
|
372
|
-
If :Options.preserve: was set then we save the scratch directory and
|
|
373
|
-
save the stderr, stdout, and exit code to the scratch directory for
|
|
374
|
-
debugging.
|
|
375
|
-
"""
|
|
376
|
-
if self._opts.preserve:
|
|
377
|
-
# Save the output to the scratch directory
|
|
378
|
-
actual_name = os.path.join(self._scratch_dir, f"{out_name}")
|
|
379
|
-
with open(actual_name, "wb") as f:
|
|
380
|
-
f.write(self._output[out_name])
|
|
381
|
-
|
|
382
|
-
exact_name = f"{self._test_file}.{out_name}.exact"
|
|
383
|
-
glob_name = f"{self._test_file}.{out_name}.glob"
|
|
384
|
-
ignore_name = f"{self._test_file}.{out_name}.ignore"
|
|
385
|
-
|
|
386
|
-
if os.path.exists(exact_name):
|
|
387
|
-
return self._check_output_exact(out_name, read_file(exact_name), exact_name)
|
|
388
|
-
elif os.path.exists(glob_name):
|
|
389
|
-
return self._check_output_glob(out_name, read_file(glob_name))
|
|
390
|
-
else:
|
|
391
|
-
check_name = f"check_{out_name}"
|
|
392
|
-
self._success[check_name] = True
|
|
393
|
-
self._message[check_name] = f"{out_name} ignored!"
|
|
394
|
-
|
|
395
|
-
def _check_stderr(self) -> None:
|
|
396
|
-
"""Checks the stderr output against the expectation."""
|
|
397
|
-
self._check_output("stderr")
|
|
398
|
-
|
|
399
|
-
def _check_stdout(self) -> None:
|
|
400
|
-
"""Checks the stdout output against the expectation."""
|
|
401
|
-
self._check_output("stdout")
|
|
402
|
-
|
|
403
|
-
def _check_exit(self) -> None:
|
|
404
|
-
"""
|
|
405
|
-
Checks the exit code against expectations. If a .exit file
|
|
406
|
-
exists, we expect that the exit code matches the contents.
|
|
407
|
-
Otherwise we expect the exit code to be zero.
|
|
408
|
-
|
|
409
|
-
If :Options.preserve: is set we save the exit code to the
|
|
410
|
-
scratch directory under the filename "exit".
|
|
411
|
-
"""
|
|
412
|
-
if self._opts.preserve:
|
|
413
|
-
exit_name = os.path.join(self._scratch_dir, "exit")
|
|
414
|
-
with open(exit_name, "w") as f:
|
|
415
|
-
f.write(str(self._exit_code) + "\n")
|
|
416
|
-
exit_name = f"{self._test_file}.exit"
|
|
417
|
-
if os.path.exists(exit_name):
|
|
418
|
-
exit_code: int = int(read_file(exit_name))
|
|
419
|
-
else:
|
|
420
|
-
exit_code: int = 0
|
|
421
|
-
if exit_code == self._exit_code:
|
|
422
|
-
self._success["check_exit"] = True
|
|
423
|
-
self._message["check_exit"] = "Exit code matches!"
|
|
424
|
-
else:
|
|
425
|
-
self._success["check_exit"] = False
|
|
426
|
-
self._message["check_exit"] = f"Exit code mismatch! Expected {exit_code} but got {self._exit_code}"
|
|
427
|
-
|
|
428
|
-
def _analyze_results(self) -> None:
|
|
429
|
-
"""
|
|
430
|
-
After all tests have been checked, collect all the successes
|
|
431
|
-
and messages, and print the results to stdout.
|
|
432
|
-
"""
|
|
433
|
-
STATUS = {True: "PASS", False: "FAIL"}
|
|
434
|
-
checks = sorted(self._success.keys())
|
|
435
|
-
self._succeeded = all(self._success.values())
|
|
436
|
-
self._log(f"{STATUS[self._succeeded]}: {self._test_name}")
|
|
437
|
-
|
|
438
|
-
if not self._succeeded or self._opts.verbose:
|
|
439
|
-
for check in checks:
|
|
440
|
-
if self._opts.verbose or not self._success[check]:
|
|
441
|
-
self._log(f"{STATUS[self._success[check]]}: {self._test_name}.{check}")
|
|
442
|
-
self._log(self._message[check])
|
|
443
|
-
|
|
444
|
-
self._log("----------------------------------------")
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
class TestSuite:
|
|
448
|
-
"""
|
|
449
|
-
Setup & teardown test suite & cases.
|
|
450
|
-
This class is intended to be used as a context manager.
|
|
451
|
-
|
|
452
|
-
TODO: Make setup/teardown failure emit messages, not throw exceptions.
|
|
453
|
-
"""
|
|
454
|
-
def __init__(self, test_directory: str, options: Options) -> None:
|
|
455
|
-
self._opts = options
|
|
456
|
-
self._test_dir = os.path.abspath(test_directory)
|
|
457
|
-
rel_test_dir = os.path.relpath(test_directory, start=self._opts.test_dir)
|
|
458
|
-
assert not rel_test_dir.startswith(os.path.sep)
|
|
459
|
-
self._scratch_dir = os.path.normpath(os.path.join(self._opts.scratch_dir, rel_test_dir))
|
|
460
|
-
|
|
461
|
-
def __enter__(self) -> 'TestSuite':
|
|
462
|
-
self._setup_once()
|
|
463
|
-
return self
|
|
464
|
-
|
|
465
|
-
def __exit__(self, _exc_type, _exc_value, _traceback) -> None:
|
|
466
|
-
self._teardown_once()
|
|
467
|
-
|
|
468
|
-
@contextlib.contextmanager
|
|
469
|
-
def test_case(self, test_basename: str) -> TestCase:
|
|
470
|
-
"""
|
|
471
|
-
Context manager for a test case in the test suite.
|
|
472
|
-
Pass the basename of the test relative to the :test_directory:.
|
|
473
|
-
"""
|
|
474
|
-
assert os.path.dirname(test_basename) == ""
|
|
475
|
-
try:
|
|
476
|
-
self._setup(test_basename)
|
|
477
|
-
test_filename = os.path.join(self._test_dir, test_basename)
|
|
478
|
-
yield TestCase(test_filename, self._opts)
|
|
479
|
-
finally:
|
|
480
|
-
self._teardown(test_basename)
|
|
481
|
-
|
|
482
|
-
def _remove_scratch_dir(self, dir: str) -> None:
|
|
483
|
-
"""Helper to remove a scratch directory with sanity checks"""
|
|
484
|
-
assert "scratch" in dir
|
|
485
|
-
assert dir.startswith(self._scratch_dir)
|
|
486
|
-
assert os.path.exists(dir)
|
|
487
|
-
shutil.rmtree(dir)
|
|
488
|
-
|
|
489
|
-
def _setup_once(self) -> None:
|
|
490
|
-
if os.path.exists(self._scratch_dir):
|
|
491
|
-
self._remove_scratch_dir(self._scratch_dir)
|
|
492
|
-
os.makedirs(self._scratch_dir)
|
|
493
|
-
setup_script = os.path.join(self._test_dir, "setup_once")
|
|
494
|
-
if os.path.exists(setup_script):
|
|
495
|
-
self._run_script(setup_script, cwd=self._scratch_dir)
|
|
496
|
-
|
|
497
|
-
def _teardown_once(self) -> None:
|
|
498
|
-
assert os.path.exists(self._scratch_dir)
|
|
499
|
-
teardown_script = os.path.join(self._test_dir, "teardown_once")
|
|
500
|
-
if os.path.exists(teardown_script):
|
|
501
|
-
self._run_script(teardown_script, cwd=self._scratch_dir)
|
|
502
|
-
if not self._opts.preserve:
|
|
503
|
-
self._remove_scratch_dir(self._scratch_dir)
|
|
504
|
-
|
|
505
|
-
def _setup(self, test_basename: str) -> None:
|
|
506
|
-
test_scratch_dir = os.path.join(self._scratch_dir, test_basename)
|
|
507
|
-
assert not os.path.exists(test_scratch_dir)
|
|
508
|
-
os.makedirs(test_scratch_dir)
|
|
509
|
-
setup_script = os.path.join(self._test_dir, "setup")
|
|
510
|
-
if os.path.exists(setup_script):
|
|
511
|
-
self._run_script(setup_script, cwd=test_scratch_dir)
|
|
512
|
-
|
|
513
|
-
def _teardown(self, test_basename: str) -> None:
|
|
514
|
-
test_scratch_dir = os.path.join(self._scratch_dir, test_basename)
|
|
515
|
-
assert os.path.exists(test_scratch_dir)
|
|
516
|
-
teardown_script = os.path.join(self._test_dir, "teardown")
|
|
517
|
-
if os.path.exists(teardown_script):
|
|
518
|
-
self._run_script(teardown_script, cwd=test_scratch_dir)
|
|
519
|
-
if not self._opts.preserve:
|
|
520
|
-
self._remove_scratch_dir(test_scratch_dir)
|
|
521
|
-
|
|
522
|
-
def _run_script(self, script: str, cwd: str) -> None:
|
|
523
|
-
env = copy.copy(os.environ)
|
|
524
|
-
for k, v in self._opts.env.items():
|
|
525
|
-
env[k] = v
|
|
526
|
-
try:
|
|
527
|
-
subprocess.run(
|
|
528
|
-
args=[script],
|
|
529
|
-
stdin=subprocess.DEVNULL,
|
|
530
|
-
stdout=subprocess.PIPE,
|
|
531
|
-
stderr=subprocess.PIPE,
|
|
532
|
-
cwd=cwd,
|
|
533
|
-
env=env,
|
|
534
|
-
check=True,
|
|
535
|
-
)
|
|
536
|
-
except subprocess.CalledProcessError as e:
|
|
537
|
-
print(f"{script} failed with exit code {e.returncode}!")
|
|
538
|
-
print(f"stderr:\n{e.stderr}")
|
|
539
|
-
print(f"stdout:\n{e.stdout}")
|
|
540
|
-
raise
|
|
541
|
-
|
|
542
|
-
TestSuites = typing.Dict[str, typing.List[str]]
|
|
543
|
-
|
|
544
|
-
def get_all_tests(options: Options) -> TestSuites:
|
|
545
|
-
"""
|
|
546
|
-
Find all the test in the test directory and return the test suites.
|
|
547
|
-
"""
|
|
548
|
-
test_suites = {}
|
|
549
|
-
for root, dirs, files in os.walk(options.test_dir, topdown=True):
|
|
550
|
-
dirs[:] = [d for d in dirs if not exclude_dir(d)]
|
|
551
|
-
test_cases = []
|
|
552
|
-
for file in files:
|
|
553
|
-
if not exclude_file(file):
|
|
554
|
-
test_cases.append(file)
|
|
555
|
-
assert root == os.path.normpath(root)
|
|
556
|
-
test_suites[root] = test_cases
|
|
557
|
-
return test_suites
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
def resolve_listed_tests(
|
|
561
|
-
tests: typing.List[str], options: Options
|
|
562
|
-
) -> TestSuites:
|
|
563
|
-
"""
|
|
564
|
-
Resolve the list of tests passed on the command line into their
|
|
565
|
-
respective test suites. Tests can either be paths, or test names
|
|
566
|
-
relative to the test directory.
|
|
567
|
-
"""
|
|
568
|
-
test_suites = {}
|
|
569
|
-
for test in tests:
|
|
570
|
-
if not os.path.exists(test):
|
|
571
|
-
test = os.path.join(options.test_dir, test)
|
|
572
|
-
if not os.path.exists(test):
|
|
573
|
-
raise RuntimeError(f"Test {test} does not exist!")
|
|
574
|
-
|
|
575
|
-
test = os.path.normpath(os.path.abspath(test))
|
|
576
|
-
assert test.startswith(options.test_dir)
|
|
577
|
-
test_suite = os.path.dirname(test)
|
|
578
|
-
test_case = os.path.basename(test)
|
|
579
|
-
test_suites.setdefault(test_suite, []).append(test_case)
|
|
580
|
-
|
|
581
|
-
return test_suites
|
|
582
|
-
|
|
583
|
-
def run_tests(test_suites: TestSuites, options: Options) -> bool:
|
|
584
|
-
"""
|
|
585
|
-
Runs all the test in the :test_suites: with the given :options:.
|
|
586
|
-
Prints the results to stdout.
|
|
587
|
-
"""
|
|
588
|
-
tests = {}
|
|
589
|
-
for test_dir, test_files in test_suites.items():
|
|
590
|
-
with TestSuite(test_dir, options) as test_suite:
|
|
591
|
-
test_files = sorted(set(test_files))
|
|
592
|
-
for test_file in test_files:
|
|
593
|
-
with test_suite.test_case(test_file) as test_case:
|
|
594
|
-
tests[test_case.name] = test_case.run()
|
|
595
|
-
|
|
596
|
-
successes = 0
|
|
597
|
-
for test, status in tests.items():
|
|
598
|
-
if status:
|
|
599
|
-
successes += 1
|
|
600
|
-
else:
|
|
601
|
-
print(f"FAIL: {test}")
|
|
602
|
-
if successes == len(tests):
|
|
603
|
-
print(f"PASSED all {len(tests)} tests!")
|
|
604
|
-
return True
|
|
605
|
-
else:
|
|
606
|
-
print(f"FAILED {len(tests) - successes} / {len(tests)} tests!")
|
|
607
|
-
return False
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
def setup_zstd_symlink_dir(zstd_symlink_dir: str, zstd: str) -> None:
|
|
611
|
-
assert os.path.join("bin", "symlinks") in zstd_symlink_dir
|
|
612
|
-
if not os.path.exists(zstd_symlink_dir):
|
|
613
|
-
os.makedirs(zstd_symlink_dir)
|
|
614
|
-
for symlink in ZSTD_SYMLINKS:
|
|
615
|
-
path = os.path.join(zstd_symlink_dir, symlink)
|
|
616
|
-
if os.path.exists(path):
|
|
617
|
-
os.remove(path)
|
|
618
|
-
os.symlink(zstd, path)
|
|
619
|
-
|
|
620
|
-
if __name__ == "__main__":
|
|
621
|
-
CLI_TEST_DIR = os.path.dirname(sys.argv[0])
|
|
622
|
-
REPO_DIR = os.path.join(CLI_TEST_DIR, "..", "..")
|
|
623
|
-
PROGRAMS_DIR = os.path.join(REPO_DIR, "programs")
|
|
624
|
-
TESTS_DIR = os.path.join(REPO_DIR, "tests")
|
|
625
|
-
ZSTD_PATH = os.path.join(PROGRAMS_DIR, "zstd")
|
|
626
|
-
ZSTDGREP_PATH = os.path.join(PROGRAMS_DIR, "zstdgrep")
|
|
627
|
-
ZSTDLESS_PATH = os.path.join(PROGRAMS_DIR, "zstdless")
|
|
628
|
-
DATAGEN_PATH = os.path.join(TESTS_DIR, "datagen")
|
|
629
|
-
|
|
630
|
-
parser = argparse.ArgumentParser(
|
|
631
|
-
(
|
|
632
|
-
"Runs the zstd CLI tests. Exits nonzero on failure. Default arguments are\n"
|
|
633
|
-
"generally correct. Pass --preserve to preserve test output for debugging,\n"
|
|
634
|
-
"and --verbose to get verbose test output.\n"
|
|
635
|
-
)
|
|
636
|
-
)
|
|
637
|
-
parser.add_argument(
|
|
638
|
-
"--preserve",
|
|
639
|
-
action="store_true",
|
|
640
|
-
help="Preserve the scratch directory TEST_DIR/scratch/ for debugging purposes."
|
|
641
|
-
)
|
|
642
|
-
parser.add_argument("--verbose", action="store_true", help="Verbose test output.")
|
|
643
|
-
parser.add_argument("--timeout", default=200, type=int, help="Test case timeout in seconds. Set to 0 to disable timeouts.")
|
|
644
|
-
parser.add_argument(
|
|
645
|
-
"--exec-prefix",
|
|
646
|
-
default=None,
|
|
647
|
-
help="Sets the EXEC_PREFIX environment variable. Prefix to invocations of the zstd CLI."
|
|
648
|
-
)
|
|
649
|
-
parser.add_argument(
|
|
650
|
-
"--zstd",
|
|
651
|
-
default=ZSTD_PATH,
|
|
652
|
-
help="Sets the ZSTD_BIN environment variable. Path of the zstd CLI."
|
|
653
|
-
)
|
|
654
|
-
parser.add_argument(
|
|
655
|
-
"--zstdgrep",
|
|
656
|
-
default=ZSTDGREP_PATH,
|
|
657
|
-
help="Sets the ZSTDGREP_BIN environment variable. Path of the zstdgrep CLI."
|
|
658
|
-
)
|
|
659
|
-
parser.add_argument(
|
|
660
|
-
"--zstdless",
|
|
661
|
-
default=ZSTDLESS_PATH,
|
|
662
|
-
help="Sets the ZSTDLESS_BIN environment variable. Path of the zstdless CLI."
|
|
663
|
-
)
|
|
664
|
-
parser.add_argument(
|
|
665
|
-
"--datagen",
|
|
666
|
-
default=DATAGEN_PATH,
|
|
667
|
-
help="Sets the DATAGEN_BIN environment variable. Path to the datagen CLI."
|
|
668
|
-
)
|
|
669
|
-
parser.add_argument(
|
|
670
|
-
"--test-dir",
|
|
671
|
-
default=CLI_TEST_DIR,
|
|
672
|
-
help=(
|
|
673
|
-
"Runs the tests under this directory. "
|
|
674
|
-
"Adds TEST_DIR/bin/ to path. "
|
|
675
|
-
"Scratch directory located in TEST_DIR/scratch/."
|
|
676
|
-
)
|
|
677
|
-
)
|
|
678
|
-
parser.add_argument(
|
|
679
|
-
"--set-exact-output",
|
|
680
|
-
action="store_true",
|
|
681
|
-
help="Set stderr.exact and stdout.exact for all failing tests, unless .ignore or .glob already exists"
|
|
682
|
-
)
|
|
683
|
-
parser.add_argument(
|
|
684
|
-
"tests",
|
|
685
|
-
nargs="*",
|
|
686
|
-
help="Run only these test cases. Can either be paths or test names relative to TEST_DIR/"
|
|
687
|
-
)
|
|
688
|
-
args = parser.parse_args()
|
|
689
|
-
|
|
690
|
-
if args.timeout <= 0:
|
|
691
|
-
args.timeout = None
|
|
692
|
-
|
|
693
|
-
args.test_dir = os.path.normpath(os.path.abspath(args.test_dir))
|
|
694
|
-
bin_dir = os.path.abspath(os.path.join(args.test_dir, "bin"))
|
|
695
|
-
zstd_symlink_dir = os.path.join(bin_dir, "symlinks")
|
|
696
|
-
scratch_dir = os.path.join(args.test_dir, "scratch")
|
|
697
|
-
|
|
698
|
-
setup_zstd_symlink_dir(zstd_symlink_dir, os.path.abspath(args.zstd))
|
|
699
|
-
|
|
700
|
-
env = {}
|
|
701
|
-
if args.exec_prefix is not None:
|
|
702
|
-
env["EXEC_PREFIX"] = args.exec_prefix
|
|
703
|
-
env["ZSTD_SYMLINK_DIR"] = zstd_symlink_dir
|
|
704
|
-
env["ZSTD_REPO_DIR"] = os.path.abspath(REPO_DIR)
|
|
705
|
-
env["DATAGEN_BIN"] = os.path.abspath(args.datagen)
|
|
706
|
-
env["ZSTDGREP_BIN"] = os.path.abspath(args.zstdgrep)
|
|
707
|
-
env["ZSTDLESS_BIN"] = os.path.abspath(args.zstdless)
|
|
708
|
-
env["COMMON"] = os.path.abspath(os.path.join(args.test_dir, "common"))
|
|
709
|
-
env["PATH"] = bin_dir + ":" + os.getenv("PATH", "")
|
|
710
|
-
env["LC_ALL"] = "C"
|
|
711
|
-
|
|
712
|
-
opts = Options(
|
|
713
|
-
env=env,
|
|
714
|
-
timeout=args.timeout,
|
|
715
|
-
verbose=args.verbose,
|
|
716
|
-
preserve=args.preserve,
|
|
717
|
-
test_dir=args.test_dir,
|
|
718
|
-
scratch_dir=scratch_dir,
|
|
719
|
-
set_exact_output=args.set_exact_output,
|
|
720
|
-
)
|
|
721
|
-
|
|
722
|
-
if len(args.tests) == 0:
|
|
723
|
-
tests = get_all_tests(opts)
|
|
724
|
-
else:
|
|
725
|
-
tests = resolve_listed_tests(args.tests, opts)
|
|
726
|
-
|
|
727
|
-
success = run_tests(tests, opts)
|
|
728
|
-
if success:
|
|
729
|
-
sys.exit(0)
|
|
730
|
-
else:
|
|
731
|
-
sys.exit(1)
|