koffi 2.3.6-beta.6 → 2.3.7
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/CHANGELOG.md +7 -0
- package/package.json +2 -2
- package/src/cnoke/cnoke.js +3 -7
- package/src/cnoke/src/builder.js +9 -6
- package/src/cnoke/src/index.js +2 -2
- package/src/koffi/build/2.3.7/koffi_darwin_arm64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_darwin_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_freebsd_arm64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_freebsd_ia32/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_freebsd_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_linux_arm32hf/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_linux_arm64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_linux_ia32/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_linux_riscv64hf64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_linux_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_openbsd_ia32/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_openbsd_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_win32_arm64/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_win32_ia32/koffi.node +0 -0
- package/src/koffi/build/2.3.7/koffi_win32_x64/koffi.node +0 -0
- package/src/koffi/src/ffi.cc +2 -2
- package/src/koffi/src/index.d.ts +2 -2
- package/src/koffi/src/index.js +1 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_darwin_arm64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_darwin_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_freebsd_arm64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_freebsd_ia32/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_freebsd_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_linux_arm32hf/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_linux_arm64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_linux_ia32/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_linux_riscv64hf64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_linux_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_openbsd_ia32/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_openbsd_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_win32_arm64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_win32_arm64/koffi.pdb +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_win32_ia32/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_win32_ia32/koffi.pdb +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_win32_x64/koffi.node +0 -0
- package/src/koffi/build/2.3.6-beta.6/koffi_win32_x64/koffi.pdb +0 -0
- package/vendor/brotli/BUILD +0 -144
- package/vendor/brotli/CMakeLists.txt +0 -421
- package/vendor/brotli/CONTRIBUTING.md +0 -27
- package/vendor/brotli/LICENSE +0 -19
- package/vendor/brotli/MANIFEST.in +0 -17
- package/vendor/brotli/Makefile +0 -55
- package/vendor/brotli/Makefile.am +0 -38
- package/vendor/brotli/README +0 -15
- package/vendor/brotli/README.md +0 -104
- package/vendor/brotli/WORKSPACE +0 -21
- package/vendor/brotli/bootstrap +0 -35
- package/vendor/brotli/c/common/constants.c +0 -15
- package/vendor/brotli/c/common/constants.h +0 -200
- package/vendor/brotli/c/common/context.c +0 -156
- package/vendor/brotli/c/common/context.h +0 -113
- package/vendor/brotli/c/common/dictionary.c +0 -5914
- package/vendor/brotli/c/common/dictionary.h +0 -64
- package/vendor/brotli/c/common/platform.c +0 -22
- package/vendor/brotli/c/common/platform.h +0 -596
- package/vendor/brotli/c/common/transform.c +0 -291
- package/vendor/brotli/c/common/transform.h +0 -85
- package/vendor/brotli/c/common/version.h +0 -26
- package/vendor/brotli/c/dec/bit_reader.c +0 -76
- package/vendor/brotli/c/dec/bit_reader.h +0 -351
- package/vendor/brotli/c/dec/decode.c +0 -2608
- package/vendor/brotli/c/dec/huffman.c +0 -339
- package/vendor/brotli/c/dec/huffman.h +0 -121
- package/vendor/brotli/c/dec/prefix.h +0 -732
- package/vendor/brotli/c/dec/state.c +0 -159
- package/vendor/brotli/c/dec/state.h +0 -365
- package/vendor/brotli/c/enc/backward_references.c +0 -145
- package/vendor/brotli/c/enc/backward_references.h +0 -39
- package/vendor/brotli/c/enc/backward_references_hq.c +0 -843
- package/vendor/brotli/c/enc/backward_references_hq.h +0 -95
- package/vendor/brotli/c/enc/backward_references_inc.h +0 -163
- package/vendor/brotli/c/enc/bit_cost.c +0 -35
- package/vendor/brotli/c/enc/bit_cost.h +0 -63
- package/vendor/brotli/c/enc/bit_cost_inc.h +0 -127
- package/vendor/brotli/c/enc/block_encoder_inc.h +0 -34
- package/vendor/brotli/c/enc/block_splitter.c +0 -194
- package/vendor/brotli/c/enc/block_splitter.h +0 -51
- package/vendor/brotli/c/enc/block_splitter_inc.h +0 -440
- package/vendor/brotli/c/enc/brotli_bit_stream.c +0 -1314
- package/vendor/brotli/c/enc/brotli_bit_stream.h +0 -84
- package/vendor/brotli/c/enc/cluster.c +0 -56
- package/vendor/brotli/c/enc/cluster.h +0 -48
- package/vendor/brotli/c/enc/cluster_inc.h +0 -320
- package/vendor/brotli/c/enc/command.c +0 -28
- package/vendor/brotli/c/enc/command.h +0 -190
- package/vendor/brotli/c/enc/compress_fragment.c +0 -790
- package/vendor/brotli/c/enc/compress_fragment.h +0 -61
- package/vendor/brotli/c/enc/compress_fragment_two_pass.c +0 -645
- package/vendor/brotli/c/enc/compress_fragment_two_pass.h +0 -54
- package/vendor/brotli/c/enc/dictionary_hash.c +0 -1846
- package/vendor/brotli/c/enc/dictionary_hash.h +0 -25
- package/vendor/brotli/c/enc/encode.c +0 -1927
- package/vendor/brotli/c/enc/encoder_dict.c +0 -33
- package/vendor/brotli/c/enc/encoder_dict.h +0 -43
- package/vendor/brotli/c/enc/entropy_encode.c +0 -503
- package/vendor/brotli/c/enc/entropy_encode.h +0 -122
- package/vendor/brotli/c/enc/entropy_encode_static.h +0 -539
- package/vendor/brotli/c/enc/fast_log.c +0 -105
- package/vendor/brotli/c/enc/fast_log.h +0 -66
- package/vendor/brotli/c/enc/find_match_length.h +0 -79
- package/vendor/brotli/c/enc/hash.h +0 -488
- package/vendor/brotli/c/enc/hash_composite_inc.h +0 -125
- package/vendor/brotli/c/enc/hash_forgetful_chain_inc.h +0 -293
- package/vendor/brotli/c/enc/hash_longest_match64_inc.h +0 -267
- package/vendor/brotli/c/enc/hash_longest_match_inc.h +0 -262
- package/vendor/brotli/c/enc/hash_longest_match_quickly_inc.h +0 -266
- package/vendor/brotli/c/enc/hash_rolling_inc.h +0 -212
- package/vendor/brotli/c/enc/hash_to_binary_tree_inc.h +0 -329
- package/vendor/brotli/c/enc/histogram.c +0 -100
- package/vendor/brotli/c/enc/histogram.h +0 -63
- package/vendor/brotli/c/enc/histogram_inc.h +0 -51
- package/vendor/brotli/c/enc/literal_cost.c +0 -175
- package/vendor/brotli/c/enc/literal_cost.h +0 -30
- package/vendor/brotli/c/enc/memory.c +0 -170
- package/vendor/brotli/c/enc/memory.h +0 -114
- package/vendor/brotli/c/enc/metablock.c +0 -663
- package/vendor/brotli/c/enc/metablock.h +0 -105
- package/vendor/brotli/c/enc/metablock_inc.h +0 -183
- package/vendor/brotli/c/enc/params.h +0 -46
- package/vendor/brotli/c/enc/prefix.h +0 -53
- package/vendor/brotli/c/enc/quality.h +0 -165
- package/vendor/brotli/c/enc/ringbuffer.h +0 -167
- package/vendor/brotli/c/enc/static_dict.c +0 -486
- package/vendor/brotli/c/enc/static_dict.h +0 -40
- package/vendor/brotli/c/enc/static_dict_lut.h +0 -5864
- package/vendor/brotli/c/enc/utf8_util.c +0 -85
- package/vendor/brotli/c/enc/utf8_util.h +0 -32
- package/vendor/brotli/c/enc/write_bits.h +0 -87
- package/vendor/brotli/c/include/brotli/decode.h +0 -344
- package/vendor/brotli/c/include/brotli/encode.h +0 -448
- package/vendor/brotli/c/include/brotli/port.h +0 -288
- package/vendor/brotli/c/include/brotli/types.h +0 -83
- package/vendor/brotli/c/tools/brotli.c +0 -1116
- package/vendor/brotli/c/tools/brotli.md +0 -107
- package/vendor/brotli/compiler_config_setting.bzl +0 -28
- package/vendor/brotli/configure +0 -8
- package/vendor/brotli/configure-cmake +0 -318
- package/vendor/brotli/configure.ac +0 -14
- package/vendor/brotli/docs/brotli.1 +0 -132
- package/vendor/brotli/docs/constants.h.3 +0 -47
- package/vendor/brotli/docs/decode.h.3 +0 -415
- package/vendor/brotli/docs/encode.h.3 +0 -586
- package/vendor/brotli/docs/types.h.3 +0 -117
- package/vendor/brotli/premake5.lua +0 -78
- package/vendor/brotli/python/Makefile +0 -57
- package/vendor/brotli/python/README.md +0 -54
- package/vendor/brotli/python/_brotli.cc +0 -753
- package/vendor/brotli/python/bro.py +0 -160
- package/vendor/brotli/python/brotli.py +0 -56
- package/vendor/brotli/python/tests/__init__.py +0 -0
- package/vendor/brotli/python/tests/_test_utils.py +0 -112
- package/vendor/brotli/python/tests/bro_test.py +0 -102
- package/vendor/brotli/python/tests/compress_test.py +0 -41
- package/vendor/brotli/python/tests/compressor_test.py +0 -94
- package/vendor/brotli/python/tests/decompress_test.py +0 -42
- package/vendor/brotli/python/tests/decompressor_test.py +0 -59
- package/vendor/brotli/scripts/libbrotlicommon.pc.in +0 -11
- package/vendor/brotli/scripts/libbrotlidec.pc.in +0 -12
- package/vendor/brotli/scripts/libbrotlienc.pc.in +0 -12
- package/vendor/brotli/scripts/sources.lst +0 -104
- package/vendor/brotli/setup.cfg +0 -5
- package/vendor/brotli/setup.py +0 -293
- package/vendor/brotli/tests/Makefile +0 -17
- package/vendor/brotli/tests/compatibility_test.sh +0 -25
- package/vendor/brotli/tests/roundtrip_test.sh +0 -36
- package/vendor/brotli/tests/run-compatibility-test.cmake +0 -31
- package/vendor/brotli/tests/run-roundtrip-test.cmake +0 -36
- package/vendor/brotli/tests/testdata/empty +0 -0
- package/vendor/brotli/tests/testdata/empty.compressed +0 -1
- package/vendor/brotli/tests/testdata/ukkonooa +0 -1
- package/vendor/brotli/tests/testdata/ukkonooa.compressed +0 -0
- package/vendor/dragonbox/CMakeLists.txt +0 -123
- package/vendor/dragonbox/LICENSE-Apache2-LLVM +0 -218
- package/vendor/dragonbox/LICENSE-Boost +0 -23
- package/vendor/dragonbox/README.md +0 -277
- package/vendor/dragonbox/cmake/dragonboxConfig.cmake +0 -1
- package/vendor/dragonbox/include/dragonbox/dragonbox.h +0 -2674
- package/vendor/dragonbox/include/dragonbox/dragonbox_to_chars.h +0 -108
- package/vendor/dragonbox/other_files/Dragonbox.pdf +0 -0
- package/vendor/dragonbox/other_files/Dragonbox_old.pdf +0 -0
- package/vendor/dragonbox/other_files/milo_benchmark.png +0 -0
- package/vendor/dragonbox/other_files/unknown_win64_vc2019.html +0 -540
- package/vendor/dragonbox/other_files/unknown_win64_vc2019_randomdigit_time.png +0 -0
- package/vendor/dragonbox/source/dragonbox_to_chars.cpp +0 -303
- package/vendor/dragonbox/subproject/3rdparty/grisu_exact/CMakeLists.txt +0 -24
- package/vendor/dragonbox/subproject/3rdparty/grisu_exact/fp_to_chars.cpp +0 -238
- package/vendor/dragonbox/subproject/3rdparty/grisu_exact/fp_to_chars.h +0 -95
- package/vendor/dragonbox/subproject/3rdparty/grisu_exact/grisu_exact.h +0 -2666
- package/vendor/dragonbox/subproject/3rdparty/ryu/CMakeLists.txt +0 -16
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/common.h +0 -114
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s.c +0 -509
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s_full_table.h +0 -367
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/d2s_intrinsics.h +0 -357
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/digit_table.h +0 -35
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s.c +0 -345
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s_full_table.h +0 -55
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/f2s_intrinsics.h +0 -128
- package/vendor/dragonbox/subproject/3rdparty/ryu/ryu/ryu.h +0 -46
- package/vendor/dragonbox/subproject/3rdparty/schubfach/CMakeLists.txt +0 -22
- package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_32.cc +0 -699
- package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_32.h +0 -31
- package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_64.cc +0 -1354
- package/vendor/dragonbox/subproject/3rdparty/schubfach/schubfach_64.h +0 -31
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/example_shaded_plots.m +0 -68
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/license.txt +0 -25
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_distribution.m +0 -92
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_distribution_prctile.m +0 -121
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_histogram_shaded.m +0 -99
- package/vendor/dragonbox/subproject/3rdparty/shaded_plots/plot_shaded.m +0 -93
- package/vendor/dragonbox/subproject/benchmark/CMakeLists.txt +0 -65
- package/vendor/dragonbox/subproject/benchmark/include/benchmark.h +0 -40
- package/vendor/dragonbox/subproject/benchmark/matlab/plot_benchmarks.m +0 -22
- package/vendor/dragonbox/subproject/benchmark/matlab/plot_digit_benchmark.m +0 -78
- package/vendor/dragonbox/subproject/benchmark/matlab/plot_uniform_benchmark.m +0 -95
- package/vendor/dragonbox/subproject/benchmark/results/digits_benchmark_binary32_clang.png +0 -0
- package/vendor/dragonbox/subproject/benchmark/results/digits_benchmark_binary32_msvc.png +0 -0
- package/vendor/dragonbox/subproject/benchmark/results/digits_benchmark_binary64_clang.png +0 -0
- package/vendor/dragonbox/subproject/benchmark/results/digits_benchmark_binary64_msvc.png +0 -0
- package/vendor/dragonbox/subproject/benchmark/results/uniform_benchmark_binary32_clang.png +0 -0
- package/vendor/dragonbox/subproject/benchmark/results/uniform_benchmark_binary32_msvc.png +0 -0
- package/vendor/dragonbox/subproject/benchmark/results/uniform_benchmark_binary64_clang.png +0 -0
- package/vendor/dragonbox/subproject/benchmark/results/uniform_benchmark_binary64_msvc.png +0 -0
- package/vendor/dragonbox/subproject/benchmark/source/benchmark.cpp +0 -238
- package/vendor/dragonbox/subproject/benchmark/source/dragonbox.cpp +0 -30
- package/vendor/dragonbox/subproject/benchmark/source/grisu_exact.cpp +0 -36
- package/vendor/dragonbox/subproject/benchmark/source/ryu.cpp +0 -27
- package/vendor/dragonbox/subproject/benchmark/source/schubfach.cpp +0 -31
- package/vendor/dragonbox/subproject/common/CMakeLists.txt +0 -42
- package/vendor/dragonbox/subproject/common/include/best_rational_approx.h +0 -97
- package/vendor/dragonbox/subproject/common/include/big_uint.h +0 -218
- package/vendor/dragonbox/subproject/common/include/continued_fractions.h +0 -174
- package/vendor/dragonbox/subproject/common/include/good_rational_approx.h +0 -267
- package/vendor/dragonbox/subproject/common/include/random_float.h +0 -182
- package/vendor/dragonbox/subproject/common/include/rational_continued_fractions.h +0 -57
- package/vendor/dragonbox/subproject/common/source/big_uint.cpp +0 -602
- package/vendor/dragonbox/subproject/meta/CMakeLists.txt +0 -41
- package/vendor/dragonbox/subproject/meta/results/binary32_generated_cache.txt +0 -82
- package/vendor/dragonbox/subproject/meta/results/binary64_compressed_cache_error_table.txt +0 -10
- package/vendor/dragonbox/subproject/meta/results/binary64_generated_cache.txt +0 -623
- package/vendor/dragonbox/subproject/meta/source/generate_cache.cpp +0 -126
- package/vendor/dragonbox/subproject/meta/source/live_test.cpp +0 -81
- package/vendor/dragonbox/subproject/meta/source/perf_test.cpp +0 -104
- package/vendor/dragonbox/subproject/meta/source/sandbox.cpp +0 -20
- package/vendor/dragonbox/subproject/test/CMakeLists.txt +0 -70
- package/vendor/dragonbox/subproject/test/results/binary32.csv +0 -255
- package/vendor/dragonbox/subproject/test/results/binary64.csv +0 -2047
- package/vendor/dragonbox/subproject/test/results/plot_required_bits.m +0 -18
- package/vendor/dragonbox/subproject/test/source/test_all_shorter_interval_cases.cpp +0 -88
- package/vendor/dragonbox/subproject/test/source/uniform_random_test.cpp +0 -95
- package/vendor/dragonbox/subproject/test/source/verify_cache_precision.cpp +0 -338
- package/vendor/dragonbox/subproject/test/source/verify_compressed_cache.cpp +0 -154
- package/vendor/dragonbox/subproject/test/source/verify_fast_multiplication.cpp +0 -168
- package/vendor/dragonbox/subproject/test/source/verify_log_computation.cpp +0 -251
- package/vendor/dragonbox/subproject/test/source/verify_magic_division.cpp +0 -113
- package/vendor/miniz/ChangeLog.md +0 -239
- package/vendor/miniz/LICENSE +0 -22
- package/vendor/miniz/examples/example1.c +0 -105
- package/vendor/miniz/examples/example2.c +0 -164
- package/vendor/miniz/examples/example3.c +0 -269
- package/vendor/miniz/examples/example4.c +0 -102
- package/vendor/miniz/examples/example5.c +0 -327
- package/vendor/miniz/examples/example6.c +0 -166
- package/vendor/miniz/miniz.c +0 -7835
- package/vendor/miniz/miniz.h +0 -1422
- package/vendor/miniz/readme.md +0 -46
- /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_arm64/koffi.exp +0 -0
- /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_arm64/koffi.lib +0 -0
- /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_ia32/koffi.exp +0 -0
- /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_ia32/koffi.lib +0 -0
- /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_x64/koffi.exp +0 -0
- /package/src/koffi/build/{2.3.6-beta.6 → 2.3.7}/koffi_win32_x64/koffi.lib +0 -0
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
prefix=@prefix@
|
|
2
|
-
exec_prefix=@exec_prefix@
|
|
3
|
-
libdir=@libdir@
|
|
4
|
-
includedir=@includedir@
|
|
5
|
-
|
|
6
|
-
Name: libbrotlidec
|
|
7
|
-
URL: https://github.com/google/brotli
|
|
8
|
-
Description: Brotli decoder library
|
|
9
|
-
Version: @PACKAGE_VERSION@
|
|
10
|
-
Libs: -L${libdir} -R${libdir} -lbrotlidec
|
|
11
|
-
Requires.private: libbrotlicommon >= 1.0.2
|
|
12
|
-
Cflags: -I${includedir}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
prefix=@prefix@
|
|
2
|
-
exec_prefix=@exec_prefix@
|
|
3
|
-
libdir=@libdir@
|
|
4
|
-
includedir=@includedir@
|
|
5
|
-
|
|
6
|
-
Name: libbrotlienc
|
|
7
|
-
URL: https://github.com/google/brotli
|
|
8
|
-
Description: Brotli encoder library
|
|
9
|
-
Version: @PACKAGE_VERSION@
|
|
10
|
-
Libs: -L${libdir} -R${libdir} -lbrotlienc
|
|
11
|
-
Requires.private: libbrotlicommon >= 1.0.2
|
|
12
|
-
Cflags: -I${includedir}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# IT WOULD BE FOOLISH TO USE COMPUTERS TO AUTOMATE REPETITIVE TASKS:
|
|
2
|
-
# ENLIST EVERY USED HEADER AND SOURCE FILE MANUALLY!
|
|
3
|
-
|
|
4
|
-
BROTLI_CLI_C = \
|
|
5
|
-
c/tools/brotli.c
|
|
6
|
-
|
|
7
|
-
BROTLI_COMMON_C = \
|
|
8
|
-
c/common/constants.c \
|
|
9
|
-
c/common/context.c \
|
|
10
|
-
c/common/dictionary.c \
|
|
11
|
-
c/common/platform.c \
|
|
12
|
-
c/common/transform.c
|
|
13
|
-
|
|
14
|
-
BROTLI_COMMON_H = \
|
|
15
|
-
c/common/constants.h \
|
|
16
|
-
c/common/context.h \
|
|
17
|
-
c/common/dictionary.h \
|
|
18
|
-
c/common/platform.h \
|
|
19
|
-
c/common/transform.h \
|
|
20
|
-
c/common/version.h
|
|
21
|
-
|
|
22
|
-
BROTLI_DEC_C = \
|
|
23
|
-
c/dec/bit_reader.c \
|
|
24
|
-
c/dec/decode.c \
|
|
25
|
-
c/dec/huffman.c \
|
|
26
|
-
c/dec/state.c
|
|
27
|
-
|
|
28
|
-
BROTLI_DEC_H = \
|
|
29
|
-
c/dec/bit_reader.h \
|
|
30
|
-
c/dec/huffman.h \
|
|
31
|
-
c/dec/prefix.h \
|
|
32
|
-
c/dec/state.h
|
|
33
|
-
|
|
34
|
-
BROTLI_ENC_C = \
|
|
35
|
-
c/enc/backward_references.c \
|
|
36
|
-
c/enc/backward_references_hq.c \
|
|
37
|
-
c/enc/bit_cost.c \
|
|
38
|
-
c/enc/block_splitter.c \
|
|
39
|
-
c/enc/brotli_bit_stream.c \
|
|
40
|
-
c/enc/cluster.c \
|
|
41
|
-
c/enc/command.c \
|
|
42
|
-
c/enc/compress_fragment.c \
|
|
43
|
-
c/enc/compress_fragment_two_pass.c \
|
|
44
|
-
c/enc/dictionary_hash.c \
|
|
45
|
-
c/enc/encode.c \
|
|
46
|
-
c/enc/encoder_dict.c \
|
|
47
|
-
c/enc/entropy_encode.c \
|
|
48
|
-
c/enc/fast_log.c \
|
|
49
|
-
c/enc/histogram.c \
|
|
50
|
-
c/enc/literal_cost.c \
|
|
51
|
-
c/enc/memory.c \
|
|
52
|
-
c/enc/metablock.c \
|
|
53
|
-
c/enc/static_dict.c \
|
|
54
|
-
c/enc/utf8_util.c
|
|
55
|
-
|
|
56
|
-
BROTLI_ENC_H = \
|
|
57
|
-
c/enc/backward_references.h \
|
|
58
|
-
c/enc/backward_references_hq.h \
|
|
59
|
-
c/enc/backward_references_inc.h \
|
|
60
|
-
c/enc/bit_cost.h \
|
|
61
|
-
c/enc/bit_cost_inc.h \
|
|
62
|
-
c/enc/block_encoder_inc.h \
|
|
63
|
-
c/enc/block_splitter.h \
|
|
64
|
-
c/enc/block_splitter_inc.h \
|
|
65
|
-
c/enc/brotli_bit_stream.h \
|
|
66
|
-
c/enc/cluster.h \
|
|
67
|
-
c/enc/cluster_inc.h \
|
|
68
|
-
c/enc/command.h \
|
|
69
|
-
c/enc/compress_fragment.h \
|
|
70
|
-
c/enc/compress_fragment_two_pass.h \
|
|
71
|
-
c/enc/dictionary_hash.h \
|
|
72
|
-
c/enc/encoder_dict.h \
|
|
73
|
-
c/enc/entropy_encode.h \
|
|
74
|
-
c/enc/entropy_encode_static.h \
|
|
75
|
-
c/enc/fast_log.h \
|
|
76
|
-
c/enc/find_match_length.h \
|
|
77
|
-
c/enc/hash.h \
|
|
78
|
-
c/enc/hash_composite_inc.h \
|
|
79
|
-
c/enc/hash_forgetful_chain_inc.h \
|
|
80
|
-
c/enc/hash_longest_match64_inc.h \
|
|
81
|
-
c/enc/hash_longest_match_inc.h \
|
|
82
|
-
c/enc/hash_longest_match_quickly_inc.h \
|
|
83
|
-
c/enc/hash_rolling_inc.h \
|
|
84
|
-
c/enc/hash_to_binary_tree_inc.h \
|
|
85
|
-
c/enc/histogram.h \
|
|
86
|
-
c/enc/histogram_inc.h \
|
|
87
|
-
c/enc/literal_cost.h \
|
|
88
|
-
c/enc/memory.h \
|
|
89
|
-
c/enc/metablock.h \
|
|
90
|
-
c/enc/metablock_inc.h \
|
|
91
|
-
c/enc/params.h \
|
|
92
|
-
c/enc/prefix.h \
|
|
93
|
-
c/enc/quality.h \
|
|
94
|
-
c/enc/ringbuffer.h \
|
|
95
|
-
c/enc/static_dict.h \
|
|
96
|
-
c/enc/static_dict_lut.h \
|
|
97
|
-
c/enc/utf8_util.h \
|
|
98
|
-
c/enc/write_bits.h
|
|
99
|
-
|
|
100
|
-
BROTLI_INCLUDE = \
|
|
101
|
-
c/include/brotli/decode.h \
|
|
102
|
-
c/include/brotli/encode.h \
|
|
103
|
-
c/include/brotli/port.h \
|
|
104
|
-
c/include/brotli/types.h
|
package/vendor/brotli/setup.cfg
DELETED
package/vendor/brotli/setup.py
DELETED
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# Copyright 2015 The Brotli Authors. All rights reserved.
|
|
2
|
-
#
|
|
3
|
-
# Distributed under MIT license.
|
|
4
|
-
# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
|
|
5
|
-
|
|
6
|
-
import os
|
|
7
|
-
import platform
|
|
8
|
-
import re
|
|
9
|
-
import unittest
|
|
10
|
-
|
|
11
|
-
try:
|
|
12
|
-
from setuptools import Extension
|
|
13
|
-
from setuptools import setup
|
|
14
|
-
except:
|
|
15
|
-
from distutils.core import Extension
|
|
16
|
-
from distutils.core import setup
|
|
17
|
-
from distutils.command.build_ext import build_ext
|
|
18
|
-
from distutils import errors
|
|
19
|
-
from distutils import dep_util
|
|
20
|
-
from distutils import log
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
CURR_DIR = os.path.abspath(os.path.dirname(os.path.realpath(__file__)))
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def get_version():
|
|
27
|
-
""" Return BROTLI_VERSION string as defined in 'common/version.h' file. """
|
|
28
|
-
version_file_path = os.path.join(CURR_DIR, 'c', 'common', 'version.h')
|
|
29
|
-
version = 0
|
|
30
|
-
with open(version_file_path, 'r') as f:
|
|
31
|
-
for line in f:
|
|
32
|
-
m = re.match(r'#define\sBROTLI_VERSION\s+0x([0-9a-fA-F]+)', line)
|
|
33
|
-
if m:
|
|
34
|
-
version = int(m.group(1), 16)
|
|
35
|
-
if version == 0:
|
|
36
|
-
return ''
|
|
37
|
-
# Semantic version is calculated as (MAJOR << 24) | (MINOR << 12) | PATCH.
|
|
38
|
-
major = version >> 24
|
|
39
|
-
minor = (version >> 12) & 0xFFF
|
|
40
|
-
patch = version & 0xFFF
|
|
41
|
-
return '{0}.{1}.{2}'.format(major, minor, patch)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def get_test_suite():
|
|
45
|
-
test_loader = unittest.TestLoader()
|
|
46
|
-
test_suite = test_loader.discover('python', pattern='*_test.py')
|
|
47
|
-
return test_suite
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class BuildExt(build_ext):
|
|
51
|
-
|
|
52
|
-
def get_source_files(self):
|
|
53
|
-
filenames = build_ext.get_source_files(self)
|
|
54
|
-
for ext in self.extensions:
|
|
55
|
-
filenames.extend(ext.depends)
|
|
56
|
-
return filenames
|
|
57
|
-
|
|
58
|
-
def build_extension(self, ext):
|
|
59
|
-
if ext.sources is None or not isinstance(ext.sources, (list, tuple)):
|
|
60
|
-
raise errors.DistutilsSetupError(
|
|
61
|
-
"in 'ext_modules' option (extension '%s'), "
|
|
62
|
-
"'sources' must be present and must be "
|
|
63
|
-
"a list of source filenames" % ext.name)
|
|
64
|
-
|
|
65
|
-
ext_path = self.get_ext_fullpath(ext.name)
|
|
66
|
-
depends = ext.sources + ext.depends
|
|
67
|
-
if not (self.force or dep_util.newer_group(depends, ext_path, 'newer')):
|
|
68
|
-
log.debug("skipping '%s' extension (up-to-date)", ext.name)
|
|
69
|
-
return
|
|
70
|
-
else:
|
|
71
|
-
log.info("building '%s' extension", ext.name)
|
|
72
|
-
|
|
73
|
-
c_sources = []
|
|
74
|
-
cxx_sources = []
|
|
75
|
-
for source in ext.sources:
|
|
76
|
-
if source.endswith('.c'):
|
|
77
|
-
c_sources.append(source)
|
|
78
|
-
else:
|
|
79
|
-
cxx_sources.append(source)
|
|
80
|
-
extra_args = ext.extra_compile_args or []
|
|
81
|
-
|
|
82
|
-
objects = []
|
|
83
|
-
for lang, sources in (('c', c_sources), ('c++', cxx_sources)):
|
|
84
|
-
if lang == 'c++':
|
|
85
|
-
if self.compiler.compiler_type == 'msvc':
|
|
86
|
-
extra_args.append('/EHsc')
|
|
87
|
-
|
|
88
|
-
macros = ext.define_macros[:]
|
|
89
|
-
if platform.system() == 'Darwin':
|
|
90
|
-
macros.append(('OS_MACOSX', '1'))
|
|
91
|
-
elif self.compiler.compiler_type == 'mingw32':
|
|
92
|
-
# On Windows Python 2.7, pyconfig.h defines "hypot" as "_hypot",
|
|
93
|
-
# This clashes with GCC's cmath, and causes compilation errors when
|
|
94
|
-
# building under MinGW: http://bugs.python.org/issue11566
|
|
95
|
-
macros.append(('_hypot', 'hypot'))
|
|
96
|
-
for undef in ext.undef_macros:
|
|
97
|
-
macros.append((undef,))
|
|
98
|
-
|
|
99
|
-
objs = self.compiler.compile(
|
|
100
|
-
sources,
|
|
101
|
-
output_dir=self.build_temp,
|
|
102
|
-
macros=macros,
|
|
103
|
-
include_dirs=ext.include_dirs,
|
|
104
|
-
debug=self.debug,
|
|
105
|
-
extra_postargs=extra_args,
|
|
106
|
-
depends=ext.depends)
|
|
107
|
-
objects.extend(objs)
|
|
108
|
-
|
|
109
|
-
self._built_objects = objects[:]
|
|
110
|
-
if ext.extra_objects:
|
|
111
|
-
objects.extend(ext.extra_objects)
|
|
112
|
-
extra_args = ext.extra_link_args or []
|
|
113
|
-
# when using GCC on Windows, we statically link libgcc and libstdc++,
|
|
114
|
-
# so that we don't need to package extra DLLs
|
|
115
|
-
if self.compiler.compiler_type == 'mingw32':
|
|
116
|
-
extra_args.extend(['-static-libgcc', '-static-libstdc++'])
|
|
117
|
-
|
|
118
|
-
ext_path = self.get_ext_fullpath(ext.name)
|
|
119
|
-
# Detect target language, if not provided
|
|
120
|
-
language = ext.language or self.compiler.detect_language(sources)
|
|
121
|
-
|
|
122
|
-
self.compiler.link_shared_object(
|
|
123
|
-
objects,
|
|
124
|
-
ext_path,
|
|
125
|
-
libraries=self.get_libraries(ext),
|
|
126
|
-
library_dirs=ext.library_dirs,
|
|
127
|
-
runtime_library_dirs=ext.runtime_library_dirs,
|
|
128
|
-
extra_postargs=extra_args,
|
|
129
|
-
export_symbols=self.get_export_symbols(ext),
|
|
130
|
-
debug=self.debug,
|
|
131
|
-
build_temp=self.build_temp,
|
|
132
|
-
target_lang=language)
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
NAME = 'Brotli'
|
|
136
|
-
|
|
137
|
-
VERSION = get_version()
|
|
138
|
-
|
|
139
|
-
URL = 'https://github.com/google/brotli'
|
|
140
|
-
|
|
141
|
-
DESCRIPTION = 'Python bindings for the Brotli compression library'
|
|
142
|
-
|
|
143
|
-
AUTHOR = 'The Brotli Authors'
|
|
144
|
-
|
|
145
|
-
LICENSE = 'MIT'
|
|
146
|
-
|
|
147
|
-
PLATFORMS = ['Posix', 'MacOS X', 'Windows']
|
|
148
|
-
|
|
149
|
-
CLASSIFIERS = [
|
|
150
|
-
'Development Status :: 4 - Beta',
|
|
151
|
-
'Environment :: Console',
|
|
152
|
-
'Intended Audience :: Developers',
|
|
153
|
-
'License :: OSI Approved :: MIT License',
|
|
154
|
-
'Operating System :: MacOS :: MacOS X',
|
|
155
|
-
'Operating System :: Microsoft :: Windows',
|
|
156
|
-
'Operating System :: POSIX :: Linux',
|
|
157
|
-
'Programming Language :: C',
|
|
158
|
-
'Programming Language :: C++',
|
|
159
|
-
'Programming Language :: Python',
|
|
160
|
-
'Programming Language :: Python :: 2',
|
|
161
|
-
'Programming Language :: Python :: 2.7',
|
|
162
|
-
'Programming Language :: Python :: 3',
|
|
163
|
-
'Programming Language :: Python :: 3.3',
|
|
164
|
-
'Programming Language :: Python :: 3.4',
|
|
165
|
-
'Programming Language :: Python :: 3.5',
|
|
166
|
-
'Programming Language :: Unix Shell',
|
|
167
|
-
'Topic :: Software Development :: Libraries',
|
|
168
|
-
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
169
|
-
'Topic :: System :: Archiving',
|
|
170
|
-
'Topic :: System :: Archiving :: Compression',
|
|
171
|
-
'Topic :: Text Processing :: Fonts',
|
|
172
|
-
'Topic :: Utilities',
|
|
173
|
-
]
|
|
174
|
-
|
|
175
|
-
PACKAGE_DIR = {'': 'python'}
|
|
176
|
-
|
|
177
|
-
PY_MODULES = ['brotli']
|
|
178
|
-
|
|
179
|
-
EXT_MODULES = [
|
|
180
|
-
Extension(
|
|
181
|
-
'_brotli',
|
|
182
|
-
sources=[
|
|
183
|
-
'python/_brotli.cc',
|
|
184
|
-
'c/common/constants.c',
|
|
185
|
-
'c/common/context.c',
|
|
186
|
-
'c/common/dictionary.c',
|
|
187
|
-
'c/common/platform.c',
|
|
188
|
-
'c/common/transform.c',
|
|
189
|
-
'c/dec/bit_reader.c',
|
|
190
|
-
'c/dec/decode.c',
|
|
191
|
-
'c/dec/huffman.c',
|
|
192
|
-
'c/dec/state.c',
|
|
193
|
-
'c/enc/backward_references.c',
|
|
194
|
-
'c/enc/backward_references_hq.c',
|
|
195
|
-
'c/enc/bit_cost.c',
|
|
196
|
-
'c/enc/block_splitter.c',
|
|
197
|
-
'c/enc/brotli_bit_stream.c',
|
|
198
|
-
'c/enc/cluster.c',
|
|
199
|
-
'c/enc/command.c',
|
|
200
|
-
'c/enc/compress_fragment.c',
|
|
201
|
-
'c/enc/compress_fragment_two_pass.c',
|
|
202
|
-
'c/enc/dictionary_hash.c',
|
|
203
|
-
'c/enc/encode.c',
|
|
204
|
-
'c/enc/encoder_dict.c',
|
|
205
|
-
'c/enc/entropy_encode.c',
|
|
206
|
-
'c/enc/fast_log.c',
|
|
207
|
-
'c/enc/histogram.c',
|
|
208
|
-
'c/enc/literal_cost.c',
|
|
209
|
-
'c/enc/memory.c',
|
|
210
|
-
'c/enc/metablock.c',
|
|
211
|
-
'c/enc/static_dict.c',
|
|
212
|
-
'c/enc/utf8_util.c',
|
|
213
|
-
],
|
|
214
|
-
depends=[
|
|
215
|
-
'c/common/constants.h',
|
|
216
|
-
'c/common/context.h',
|
|
217
|
-
'c/common/dictionary.h',
|
|
218
|
-
'c/common/platform.h',
|
|
219
|
-
'c/common/transform.h',
|
|
220
|
-
'c/common/version.h',
|
|
221
|
-
'c/dec/bit_reader.h',
|
|
222
|
-
'c/dec/huffman.h',
|
|
223
|
-
'c/dec/prefix.h',
|
|
224
|
-
'c/dec/state.h',
|
|
225
|
-
'c/enc/backward_references.h',
|
|
226
|
-
'c/enc/backward_references_hq.h',
|
|
227
|
-
'c/enc/backward_references_inc.h',
|
|
228
|
-
'c/enc/bit_cost.h',
|
|
229
|
-
'c/enc/bit_cost_inc.h',
|
|
230
|
-
'c/enc/block_encoder_inc.h',
|
|
231
|
-
'c/enc/block_splitter.h',
|
|
232
|
-
'c/enc/block_splitter_inc.h',
|
|
233
|
-
'c/enc/brotli_bit_stream.h',
|
|
234
|
-
'c/enc/cluster.h',
|
|
235
|
-
'c/enc/cluster_inc.h',
|
|
236
|
-
'c/enc/command.h',
|
|
237
|
-
'c/enc/compress_fragment.h',
|
|
238
|
-
'c/enc/compress_fragment_two_pass.h',
|
|
239
|
-
'c/enc/dictionary_hash.h',
|
|
240
|
-
'c/enc/encoder_dict.h',
|
|
241
|
-
'c/enc/entropy_encode.h',
|
|
242
|
-
'c/enc/entropy_encode_static.h',
|
|
243
|
-
'c/enc/fast_log.h',
|
|
244
|
-
'c/enc/find_match_length.h',
|
|
245
|
-
'c/enc/hash.h',
|
|
246
|
-
'c/enc/hash_composite_inc.h',
|
|
247
|
-
'c/enc/hash_forgetful_chain_inc.h',
|
|
248
|
-
'c/enc/hash_longest_match64_inc.h',
|
|
249
|
-
'c/enc/hash_longest_match_inc.h',
|
|
250
|
-
'c/enc/hash_longest_match_quickly_inc.h',
|
|
251
|
-
'c/enc/hash_rolling_inc.h',
|
|
252
|
-
'c/enc/hash_to_binary_tree_inc.h',
|
|
253
|
-
'c/enc/histogram.h',
|
|
254
|
-
'c/enc/histogram_inc.h',
|
|
255
|
-
'c/enc/literal_cost.h',
|
|
256
|
-
'c/enc/memory.h',
|
|
257
|
-
'c/enc/metablock.h',
|
|
258
|
-
'c/enc/metablock_inc.h',
|
|
259
|
-
'c/enc/params.h',
|
|
260
|
-
'c/enc/prefix.h',
|
|
261
|
-
'c/enc/quality.h',
|
|
262
|
-
'c/enc/ringbuffer.h',
|
|
263
|
-
'c/enc/static_dict.h',
|
|
264
|
-
'c/enc/static_dict_lut.h',
|
|
265
|
-
'c/enc/utf8_util.h',
|
|
266
|
-
'c/enc/write_bits.h',
|
|
267
|
-
],
|
|
268
|
-
include_dirs=[
|
|
269
|
-
'c/include',
|
|
270
|
-
],
|
|
271
|
-
language='c++'),
|
|
272
|
-
]
|
|
273
|
-
|
|
274
|
-
TEST_SUITE = 'setup.get_test_suite'
|
|
275
|
-
|
|
276
|
-
CMD_CLASS = {
|
|
277
|
-
'build_ext': BuildExt,
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
setup(
|
|
281
|
-
name=NAME,
|
|
282
|
-
description=DESCRIPTION,
|
|
283
|
-
version=VERSION,
|
|
284
|
-
url=URL,
|
|
285
|
-
author=AUTHOR,
|
|
286
|
-
license=LICENSE,
|
|
287
|
-
platforms=PLATFORMS,
|
|
288
|
-
classifiers=CLASSIFIERS,
|
|
289
|
-
package_dir=PACKAGE_DIR,
|
|
290
|
-
py_modules=PY_MODULES,
|
|
291
|
-
ext_modules=EXT_MODULES,
|
|
292
|
-
test_suite=TEST_SUITE,
|
|
293
|
-
cmdclass=CMD_CLASS)
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#brotli/tests
|
|
2
|
-
|
|
3
|
-
BROTLI = ..
|
|
4
|
-
|
|
5
|
-
all: test
|
|
6
|
-
|
|
7
|
-
test: deps
|
|
8
|
-
./compatibility_test.sh
|
|
9
|
-
./roundtrip_test.sh
|
|
10
|
-
|
|
11
|
-
deps :
|
|
12
|
-
$(MAKE) -C $(BROTLI) brotli
|
|
13
|
-
|
|
14
|
-
clean :
|
|
15
|
-
rm -f testdata/*.{br,unbr,uncompressed}
|
|
16
|
-
rm -f $(BROTLI)/{enc,dec,tools}/*.{un,}br
|
|
17
|
-
$(MAKE) -C $(BROTLI)/tools clean
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Test that the brotli command-line tool can decompress old brotli-compressed
|
|
4
|
-
# files.
|
|
5
|
-
#
|
|
6
|
-
# The first argument may be a wrapper for brotli, such as 'qemu-arm'.
|
|
7
|
-
|
|
8
|
-
set -o errexit
|
|
9
|
-
|
|
10
|
-
BROTLI_WRAPPER=$1
|
|
11
|
-
BROTLI="${BROTLI_WRAPPER} bin/brotli"
|
|
12
|
-
TMP_DIR=bin/tmp
|
|
13
|
-
|
|
14
|
-
for file in tests/testdata/*.compressed*; do
|
|
15
|
-
echo "Testing decompression of file $file"
|
|
16
|
-
expected=${file%.compressed*}
|
|
17
|
-
uncompressed=${TMP_DIR}/${expected##*/}.uncompressed
|
|
18
|
-
echo $uncompressed
|
|
19
|
-
$BROTLI $file -fdo $uncompressed
|
|
20
|
-
diff -q $uncompressed $expected
|
|
21
|
-
# Test the streaming version
|
|
22
|
-
cat $file | $BROTLI -dc > $uncompressed
|
|
23
|
-
diff -q $uncompressed $expected
|
|
24
|
-
rm -f $uncompressed
|
|
25
|
-
done
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Roundtrip test for the brotli command-line tool.
|
|
4
|
-
#
|
|
5
|
-
# The first argument may be a wrapper for brotli, such as 'qemu-arm'.
|
|
6
|
-
|
|
7
|
-
set -o errexit
|
|
8
|
-
|
|
9
|
-
BROTLI_WRAPPER=$1
|
|
10
|
-
BROTLI="${BROTLI_WRAPPER} bin/brotli"
|
|
11
|
-
TMP_DIR=bin/tmp
|
|
12
|
-
INPUTS="""
|
|
13
|
-
tests/testdata/alice29.txt
|
|
14
|
-
tests/testdata/asyoulik.txt
|
|
15
|
-
tests/testdata/lcet10.txt
|
|
16
|
-
tests/testdata/plrabn12.txt
|
|
17
|
-
c/enc/encode.c
|
|
18
|
-
c/common/dictionary.h
|
|
19
|
-
c/dec/decode.c
|
|
20
|
-
"""
|
|
21
|
-
|
|
22
|
-
for file in $INPUTS; do
|
|
23
|
-
if [ -f $file ]; then
|
|
24
|
-
for quality in 1 6 9 11; do
|
|
25
|
-
echo "Roundtrip testing $file at quality $quality"
|
|
26
|
-
compressed=${TMP_DIR}/${file##*/}.br
|
|
27
|
-
uncompressed=${TMP_DIR}/${file##*/}.unbr
|
|
28
|
-
$BROTLI -fq $quality $file -o $compressed
|
|
29
|
-
$BROTLI $compressed -fdo $uncompressed
|
|
30
|
-
diff -q $file $uncompressed
|
|
31
|
-
# Test the streaming version
|
|
32
|
-
cat $file | $BROTLI -cq $quality | $BROTLI -cd >$uncompressed
|
|
33
|
-
diff -q $file $uncompressed
|
|
34
|
-
done
|
|
35
|
-
fi
|
|
36
|
-
done
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
string(REGEX REPLACE "([a-zA-Z0-9\\.]+)\\.compressed(\\.[0-9]+)?$" "\\1" REFERENCE_DATA "${INPUT}")
|
|
2
|
-
string(REGEX REPLACE "\\.compressed" "" OUTPUT_FILE "${INPUT}")
|
|
3
|
-
get_filename_component(OUTPUT_NAME "${OUTPUT_FILE}" NAME)
|
|
4
|
-
|
|
5
|
-
set(ENV{QEMU_LD_PREFIX} "${BROTLI_WRAPPER_LD_PREFIX}")
|
|
6
|
-
|
|
7
|
-
execute_process(
|
|
8
|
-
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
9
|
-
COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --decompress ${INPUT} --output=${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.unbr
|
|
10
|
-
RESULT_VARIABLE result)
|
|
11
|
-
if(result)
|
|
12
|
-
message(FATAL_ERROR "Decompression failed")
|
|
13
|
-
endif()
|
|
14
|
-
|
|
15
|
-
function(test_file_equality f1 f2)
|
|
16
|
-
if(NOT CMAKE_VERSION VERSION_LESS 2.8.7)
|
|
17
|
-
file(SHA512 "${f1}" f1_cs)
|
|
18
|
-
file(SHA512 "${f2}" f2_cs)
|
|
19
|
-
if(NOT "${f1_cs}" STREQUAL "${f2_cs}")
|
|
20
|
-
message(FATAL_ERROR "Files do not match")
|
|
21
|
-
endif()
|
|
22
|
-
else()
|
|
23
|
-
file(READ "${f1}" f1_contents)
|
|
24
|
-
file(READ "${f2}" f2_contents)
|
|
25
|
-
if(NOT "${f1_contents}" STREQUAL "${f2_contents}")
|
|
26
|
-
message(FATAL_ERROR "Files do not match")
|
|
27
|
-
endif()
|
|
28
|
-
endif()
|
|
29
|
-
endfunction()
|
|
30
|
-
|
|
31
|
-
test_file_equality("${REFERENCE_DATA}" "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.unbr")
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
set(ENV{QEMU_LD_PREFIX} "${BROTLI_WRAPPER_LD_PREFIX}")
|
|
2
|
-
|
|
3
|
-
execute_process(
|
|
4
|
-
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
5
|
-
COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --quality=${QUALITY} ${INPUT} --output=${OUTPUT}.br
|
|
6
|
-
RESULT_VARIABLE result
|
|
7
|
-
ERROR_VARIABLE result_stderr)
|
|
8
|
-
if(result)
|
|
9
|
-
message(FATAL_ERROR "Compression failed: ${result_stderr}")
|
|
10
|
-
endif()
|
|
11
|
-
|
|
12
|
-
execute_process(
|
|
13
|
-
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
|
14
|
-
COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --decompress ${OUTPUT}.br --output=${OUTPUT}.unbr
|
|
15
|
-
RESULT_VARIABLE result)
|
|
16
|
-
if(result)
|
|
17
|
-
message(FATAL_ERROR "Decompression failed")
|
|
18
|
-
endif()
|
|
19
|
-
|
|
20
|
-
function(test_file_equality f1 f2)
|
|
21
|
-
if(NOT CMAKE_VERSION VERSION_LESS 2.8.7)
|
|
22
|
-
file(SHA512 "${f1}" f1_cs)
|
|
23
|
-
file(SHA512 "${f2}" f2_cs)
|
|
24
|
-
if(NOT "${f1_cs}" STREQUAL "${f2_cs}")
|
|
25
|
-
message(FATAL_ERROR "Files do not match")
|
|
26
|
-
endif()
|
|
27
|
-
else()
|
|
28
|
-
file(READ "${f1}" f1_contents)
|
|
29
|
-
file(READ "${f2}" f2_contents)
|
|
30
|
-
if(NOT "${f1_contents}" STREQUAL "${f2_contents}")
|
|
31
|
-
message(FATAL_ERROR "Files do not match")
|
|
32
|
-
endif()
|
|
33
|
-
endif()
|
|
34
|
-
endfunction()
|
|
35
|
-
|
|
36
|
-
test_file_equality("${INPUT}" "${OUTPUT}.unbr")
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ukko nooa, ukko nooa oli kunnon mies, kun han meni saunaan, pisti laukun naulaan, ukko nooa, ukko nooa oli kunnon mies.
|
|
Binary file
|