@ttsc/win32-arm64 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/go/VERSION +2 -2
- package/bin/go/bin/go.exe +0 -0
- package/bin/go/bin/gofmt.exe +0 -0
- package/bin/go/lib/time/update.bash +2 -2
- package/bin/go/lib/time/zoneinfo.zip +0 -0
- package/bin/go/pkg/include/asm_ppc64x.h +0 -16
- package/bin/go/pkg/tool/windows_arm64/asm.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/cgo.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/compile.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/cover.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/fix.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/link.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/preprofile.exe +0 -0
- package/bin/go/pkg/tool/windows_arm64/vet.exe +0 -0
- package/bin/go/src/archive/tar/reader.go +2 -1
- package/bin/go/src/archive/zip/reader.go +5 -29
- package/bin/go/src/archive/zip/struct.go +5 -6
- package/bin/go/src/archive/zip/writer.go +120 -60
- package/bin/go/src/bufio/bufio.go +1 -1
- package/bin/go/src/bytes/buffer.go +3 -3
- package/bin/go/src/bytes/bytes.go +45 -25
- package/bin/go/src/compress/flate/deflate.go +512 -363
- package/bin/go/src/compress/flate/deflatefast.go +156 -262
- package/bin/go/src/compress/flate/dict_decoder.go +1 -4
- package/bin/go/src/compress/flate/huffman_bit_writer.go +673 -250
- package/bin/go/src/compress/flate/huffman_code.go +164 -92
- package/bin/go/src/compress/flate/level1.go +195 -0
- package/bin/go/src/compress/flate/level2.go +190 -0
- package/bin/go/src/compress/flate/level3.go +228 -0
- package/bin/go/src/compress/flate/level4.go +200 -0
- package/bin/go/src/compress/flate/level5.go +287 -0
- package/bin/go/src/compress/flate/level6.go +297 -0
- package/bin/go/src/compress/flate/load_store.go +43 -0
- package/bin/go/src/compress/flate/regmask_amd64.go +9 -0
- package/bin/go/src/compress/flate/regmask_other.go +11 -0
- package/bin/go/src/compress/flate/token.go +238 -26
- package/bin/go/src/compress/gzip/gzip.go +8 -0
- package/bin/go/src/compress/zlib/writer.go +12 -0
- package/bin/go/src/context/context.go +6 -5
- package/bin/go/src/crypto/cipher/gcm.go +0 -4
- package/bin/go/src/crypto/crypto.go +27 -4
- package/bin/go/src/crypto/des/const.go +1 -1
- package/bin/go/src/crypto/ecdsa/ecdsa.go +21 -4
- package/bin/go/src/crypto/ed25519/ed25519.go +13 -0
- package/bin/go/src/crypto/internal/boring/aes.go +2 -3
- package/bin/go/src/crypto/internal/cryptotest/aead.go +53 -0
- package/bin/go/src/crypto/internal/cryptotest/boundary.go +34 -0
- package/bin/go/src/crypto/internal/cryptotest/boundary_compat.go +16 -0
- package/bin/go/src/crypto/internal/cryptotest/fetchmodule.go +9 -3
- package/bin/go/src/crypto/internal/cryptotest/fips140.go +62 -3
- package/bin/go/src/crypto/internal/cryptotest/hash.go +14 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/go.mod +19 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/go.sum +27 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/_schema/schema_gen.go +151 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/schema.go +9792 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/schemaversion.go +11 -0
- package/bin/go/src/crypto/internal/cryptotest/wycheproof/wycheproof.go +165 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/go.mod +14 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/go.sum +25 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/_schema/schema_gen.go +125 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/schema.go +591 -0
- package/bin/go/src/crypto/internal/cryptotest/x509limbo/schemaversion.go +14 -0
- package/bin/go/src/crypto/internal/fips140/aes/_asm/ctr/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/aes/_asm/standard/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/gcm_amd64_asm.go +36 -32
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/go.mod +5 -5
- package/bin/go/src/crypto/internal/fips140/aes/gcm/_asm/gcm/go.sum +8 -6
- package/bin/go/src/crypto/internal/fips140/aes/gcm/gcm_amd64.s +29 -17
- package/bin/go/src/crypto/internal/fips140/aes/gcm/gcm_arm64.s +73 -72
- package/bin/go/src/crypto/internal/fips140/aes/gcm/ghash.go +140 -124
- package/bin/go/src/crypto/internal/fips140/bigmod/nat.go +18 -0
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_loong64.s +23 -0
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_none.go +1 -1
- package/bin/go/src/crypto/internal/fips140/check/checktest/asm_stub.go +1 -1
- package/bin/go/src/crypto/internal/fips140/drbg/rand.go +12 -4
- package/bin/go/src/crypto/internal/fips140/ecdsa/ecdsa.go +17 -10
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/_asm/fe_amd64_asm.go +0 -90
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe.go +64 -97
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64.go +0 -5
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64.s +0 -167
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_amd64_noasm.go +0 -2
- package/bin/go/src/crypto/internal/fips140/edwards25519/field/fe_generic.go +57 -1
- package/bin/go/src/crypto/internal/fips140/edwards25519/scalarmult.go +3 -2
- package/bin/go/src/crypto/internal/fips140/mldsa/mldsa.go +31 -25
- package/bin/go/src/crypto/internal/fips140/mldsa/semiexpanded.go +2 -2
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/go.mod +4 -4
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/go.sum +6 -0
- package/bin/go/src/crypto/internal/fips140/nistec/_asm/p256_asm.go +1 -613
- package/bin/go/src/crypto/internal/fips140/nistec/p256.go +2 -2
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm.go +7 -6
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm_amd64.s +0 -503
- package/bin/go/src/crypto/internal/fips140/nistec/p256_asm_arm64.s +4 -429
- package/bin/go/src/crypto/internal/fips140/nistec/p256_ordinv.go +511 -47
- package/bin/go/src/crypto/internal/fips140/pbkdf2/pbkdf2.go +1 -1
- package/bin/go/src/crypto/internal/fips140/rsa/keygen.go +48 -46
- package/bin/go/src/crypto/internal/fips140/rsa/largeexponent.go +365 -0
- package/bin/go/src/crypto/internal/fips140/rsa/pkcs1v15.go +27 -0
- package/bin/go/src/crypto/internal/fips140/sha256/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/sha3/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/sha512/_asm/go.mod +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/constant_time.go +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/xor_asm.go +1 -1
- package/bin/go/src/crypto/internal/fips140/subtle/xor_riscv64.go +18 -0
- package/bin/go/src/crypto/internal/fips140/subtle/xor_riscv64.s +33 -2
- package/bin/go/src/crypto/internal/fips140deps/cpu/cpu.go +2 -0
- package/bin/go/src/crypto/internal/fips140deps/time/time.go +7 -4
- package/bin/go/src/crypto/internal/fips140only/fips140only.go +0 -7
- package/bin/go/src/crypto/internal/fips140only/random_fips140v1.0.go +17 -0
- package/bin/go/src/crypto/internal/fips140only/random_fips140v1.28.go +16 -0
- package/bin/go/src/crypto/internal/fips140test/acvp_capabilities_fips140v1.28.json +86 -0
- package/bin/go/src/crypto/internal/fips140test/acvp_test_fips140v1.28.config.json +58 -0
- package/bin/go/src/crypto/internal/rand/rand.go +14 -14
- package/bin/go/src/crypto/internal/rand/random_fips140v1.0.go +20 -0
- package/bin/go/src/crypto/internal/rand/random_fips140v1.28.go +19 -0
- package/bin/go/src/crypto/mldsa/mldsa.go +97 -0
- package/bin/go/src/crypto/mldsa/mldsa_fips140v1.0.go +116 -0
- package/bin/go/src/crypto/mldsa/mldsa_fips140v1.26.go +226 -0
- package/bin/go/src/crypto/mlkem/mlkem.go +8 -2
- package/bin/go/src/crypto/rsa/fips.go +26 -8
- package/bin/go/src/crypto/rsa/pkcs1v15.go +2 -2
- package/bin/go/src/crypto/rsa/rsa.go +25 -2
- package/bin/go/src/crypto/sha1/sha1block_decl.go +1 -1
- package/bin/go/src/crypto/sha1/sha1block_generic.go +1 -1
- package/bin/go/src/crypto/sha1/sha1block_loong64.s +24 -8
- package/bin/go/src/crypto/sha1/sha1block_riscv64.s +225 -0
- package/bin/go/src/crypto/sha3/sha3.go +3 -2
- package/bin/go/src/crypto/tls/alert.go +2 -0
- package/bin/go/src/crypto/tls/auth.go +31 -0
- package/bin/go/src/crypto/tls/bogo_config.json +12 -23
- package/bin/go/src/crypto/tls/cipher_suites.go +3 -11
- package/bin/go/src/crypto/tls/common.go +106 -59
- package/bin/go/src/crypto/tls/common_string.go +18 -5
- package/bin/go/src/crypto/tls/conn.go +33 -35
- package/bin/go/src/crypto/tls/defaults.go +26 -20
- package/bin/go/src/crypto/tls/defaults_fips140.go +9 -0
- package/bin/go/src/crypto/tls/ech.go +9 -4
- package/bin/go/src/crypto/tls/generate_cert.go +8 -2
- package/bin/go/src/crypto/tls/handshake_client.go +17 -17
- package/bin/go/src/crypto/tls/handshake_client_tls13.go +8 -3
- package/bin/go/src/crypto/tls/handshake_server.go +26 -19
- package/bin/go/src/crypto/tls/handshake_server_tls13.go +8 -5
- package/bin/go/src/crypto/tls/key_agreement.go +5 -1
- package/bin/go/src/crypto/tls/key_schedule.go +42 -17
- package/bin/go/src/crypto/tls/prf.go +1 -1
- package/bin/go/src/crypto/tls/quic.go +6 -7
- package/bin/go/src/crypto/tls/tls.go +25 -29
- package/bin/go/src/crypto/x509/cert_pool.go +8 -4
- package/bin/go/src/crypto/x509/constraints.go +5 -0
- package/bin/go/src/crypto/x509/parser.go +101 -15
- package/bin/go/src/crypto/x509/pkcs8.go +45 -4
- package/bin/go/src/crypto/x509/pkix/pkix.go +33 -9
- package/bin/go/src/crypto/x509/root.go +113 -0
- package/bin/go/src/crypto/x509/root_darwin.go +8 -4
- package/bin/go/src/crypto/x509/root_plan9.go +2 -23
- package/bin/go/src/crypto/x509/root_unix.go +0 -97
- package/bin/go/src/crypto/x509/root_windows.go +8 -3
- package/bin/go/src/crypto/x509/verify.go +43 -4
- package/bin/go/src/crypto/x509/x509.go +169 -30
- package/bin/go/src/database/sql/closemu.go +119 -0
- package/bin/go/src/database/sql/convert.go +63 -4
- package/bin/go/src/database/sql/driver/driver.go +26 -0
- package/bin/go/src/database/sql/driver/types.go +4 -0
- package/bin/go/src/database/sql/internal/sql.go +22 -0
- package/bin/go/src/database/sql/sql.go +89 -40
- package/bin/go/src/debug/buildinfo/buildinfo.go +0 -13
- package/bin/go/src/debug/dwarf/buf.go +7 -1
- package/bin/go/src/debug/dwarf/class_string.go +3 -2
- package/bin/go/src/debug/elf/file.go +80 -50
- package/bin/go/src/debug/elf/reader.go +1 -1
- package/bin/go/src/debug/gosym/symtab.go +26 -30
- package/bin/go/src/debug/macho/file.go +2 -2
- package/bin/go/src/debug/macho/reloctype_string.go +12 -8
- package/bin/go/src/debug/pe/file.go +6 -3
- package/bin/go/src/encoding/base32/base32.go +29 -31
- package/bin/go/src/encoding/base64/base64.go +24 -29
- package/bin/go/src/encoding/gob/decode.go +7 -1
- package/bin/go/src/encoding/gob/type.go +6 -6
- package/bin/go/src/encoding/hex/hex.go +6 -6
- package/bin/go/src/encoding/json/decode.go +4 -3
- package/bin/go/src/encoding/json/encode.go +1 -2
- package/bin/go/src/encoding/json/fold.go +1 -1
- package/bin/go/src/encoding/json/internal/internal.go +11 -1
- package/bin/go/src/encoding/json/internal/jsonflags/flags.go +17 -9
- package/bin/go/src/encoding/json/internal/jsonopts/options.go +52 -37
- package/bin/go/src/encoding/json/internal/jsonopts/options_format.go +124 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/canada_geometry.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/citm_catalog.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/golang_source.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/string_escaped.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/string_unicode.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/synthea_fhir.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/_embed/twitter_status.json.zst +0 -0
- package/bin/go/src/encoding/json/internal/jsontest/testdata.go +10 -4
- package/bin/go/src/encoding/json/internal/jsonwire/decode.go +13 -36
- package/bin/go/src/encoding/json/internal/jsonwire/encode.go +7 -7
- package/bin/go/src/encoding/json/internal/jsonwire/wire.go +30 -38
- package/bin/go/src/encoding/json/jsontext/decode.go +49 -14
- package/bin/go/src/encoding/json/jsontext/doc.go +6 -11
- package/bin/go/src/encoding/json/jsontext/encode.go +55 -39
- package/bin/go/src/encoding/json/jsontext/errors.go +34 -3
- package/bin/go/src/encoding/json/jsontext/export.go +14 -0
- package/bin/go/src/encoding/json/jsontext/options.go +8 -8
- package/bin/go/src/encoding/json/jsontext/quote.go +2 -2
- package/bin/go/src/encoding/json/jsontext/state.go +14 -14
- package/bin/go/src/encoding/json/jsontext/token.go +246 -101
- package/bin/go/src/encoding/json/jsontext/value.go +31 -16
- package/bin/go/src/encoding/json/stream.go +14 -2
- package/bin/go/src/encoding/json/v2/arshal.go +100 -114
- package/bin/go/src/encoding/json/v2/arshal_any.go +6 -5
- package/bin/go/src/encoding/json/v2/arshal_default.go +292 -189
- package/bin/go/src/encoding/json/v2/{arshal_inlined.go → arshal_embedded.go} +14 -14
- package/bin/go/src/encoding/json/v2/arshal_funcs.go +28 -47
- package/bin/go/src/encoding/json/v2/arshal_methods.go +98 -29
- package/bin/go/src/encoding/json/v2/arshal_time.go +33 -13
- package/bin/go/src/encoding/json/v2/doc.go +40 -55
- package/bin/go/src/encoding/json/v2/errors.go +29 -9
- package/bin/go/src/encoding/json/v2/fields.go +83 -81
- package/bin/go/src/encoding/json/v2/intern.go +2 -2
- package/bin/go/src/encoding/json/v2/options.go +57 -41
- package/bin/go/src/encoding/json/v2_decode.go +21 -9
- package/bin/go/src/encoding/json/v2_encode.go +21 -10
- package/bin/go/src/encoding/json/v2_indent.go +2 -0
- package/bin/go/src/encoding/json/v2_inject.go +7 -4
- package/bin/go/src/encoding/json/v2_options.go +37 -30
- package/bin/go/src/encoding/json/v2_scanner.go +6 -1
- package/bin/go/src/encoding/json/v2_stream.go +49 -14
- package/bin/go/src/encoding/pem/pem.go +6 -2
- package/bin/go/src/fmt/doc.go +11 -1
- package/bin/go/src/fmt/print.go +69 -82
- package/bin/go/src/go/ast/ast.go +4 -4
- package/bin/go/src/go/ast/filter.go +1 -1
- package/bin/go/src/go/ast/scope.go +2 -2
- package/bin/go/src/go/build/build.go +1 -1
- package/bin/go/src/go/build/constraint/vers.go +4 -1
- package/bin/go/src/go/build/read.go +2 -2
- package/bin/go/src/go/constant/kind_string.go +3 -2
- package/bin/go/src/go/constant/value.go +26 -4
- package/bin/go/src/go/doc/comment/std.go +1 -0
- package/bin/go/src/go/importer/importer.go +4 -3
- package/bin/go/src/go/internal/gccgoimporter/parser.go +2 -0
- package/bin/go/src/go/internal/gcimporter/ureader.go +141 -56
- package/bin/go/src/go/parser/parser.go +11 -22
- package/bin/go/src/go/printer/math.go +28 -0
- package/bin/go/src/go/printer/nodes.go +28 -11
- package/bin/go/src/go/printer/printer.go +3 -1
- package/bin/go/src/go/scanner/errors.go +2 -0
- package/bin/go/src/go/scanner/scanner.go +40 -28
- package/bin/go/src/go/token/position.go +7 -16
- package/bin/go/src/go/types/alias.go +0 -18
- package/bin/go/src/go/types/api.go +4 -10
- package/bin/go/src/go/types/api_predicates.go +2 -2
- package/bin/go/src/go/types/assignments.go +44 -38
- package/bin/go/src/go/types/builtins.go +199 -168
- package/bin/go/src/go/types/call.go +155 -138
- package/bin/go/src/go/types/check.go +0 -83
- package/bin/go/src/go/types/const.go +22 -10
- package/bin/go/src/go/types/conversions.go +19 -19
- package/bin/go/src/go/types/cycles.go +29 -42
- package/bin/go/src/go/types/decl.go +33 -81
- package/bin/go/src/go/types/expr.go +191 -183
- package/bin/go/src/go/types/gotype.go +1 -0
- package/bin/go/src/go/types/hash.go +309 -0
- package/bin/go/src/go/types/index.go +91 -61
- package/bin/go/src/go/types/infer.go +11 -11
- package/bin/go/src/go/types/instantiate.go +27 -15
- package/bin/go/src/go/types/interface.go +2 -2
- package/bin/go/src/go/types/literals.go +56 -32
- package/bin/go/src/go/types/lookup.go +31 -14
- package/bin/go/src/go/types/named.go +58 -54
- package/bin/go/src/go/types/object.go +4 -3
- package/bin/go/src/go/types/operand.go +50 -34
- package/bin/go/src/go/types/range.go +19 -16
- package/bin/go/src/go/types/recording.go +24 -7
- package/bin/go/src/go/types/resolver.go +16 -18
- package/bin/go/src/go/types/scope.go +1 -15
- package/bin/go/src/go/types/selection.go +3 -1
- package/bin/go/src/go/types/signature.go +10 -11
- package/bin/go/src/go/types/stmt.go +34 -28
- package/bin/go/src/go/types/subst.go +82 -5
- package/bin/go/src/go/types/trie.go +93 -0
- package/bin/go/src/go/types/typelists.go +28 -0
- package/bin/go/src/go/types/typestring.go +5 -9
- package/bin/go/src/go/types/typexpr.go +17 -28
- package/bin/go/src/go/types/unify.go +12 -3
- package/bin/go/src/go/types/universe.go +12 -40
- package/bin/go/src/go/types/version.go +4 -0
- package/bin/go/src/go.mod +5 -5
- package/bin/go/src/go.sum +8 -8
- package/bin/go/src/hash/maphash/hasher.go +139 -0
- package/bin/go/src/hash/maphash/maphash.go +59 -4
- package/bin/go/src/html/template/attr_string.go +3 -2
- package/bin/go/src/html/template/delim_string.go +3 -2
- package/bin/go/src/html/template/element_string.go +3 -2
- package/bin/go/src/html/template/jsctx_string.go +3 -2
- package/bin/go/src/html/template/state_string.go +3 -2
- package/bin/go/src/html/template/template.go +7 -4
- package/bin/go/src/html/template/transition.go +1 -1
- package/bin/go/src/html/template/urlpart_string.go +3 -2
- package/bin/go/src/image/format.go +9 -0
- package/bin/go/src/image/gif/reader.go +18 -0
- package/bin/go/src/image/jpeg/huffman.go +22 -3
- package/bin/go/src/image/jpeg/reader.go +54 -29
- package/bin/go/src/image/jpeg/scan.go +68 -38
- package/bin/go/src/image/png/writer.go +8 -0
- package/bin/go/src/index/suffixarray/suffixarray.go +14 -6
- package/bin/go/src/internal/abi/abi_generic.go +1 -1
- package/bin/go/src/internal/abi/abi_s390x.go +0 -2
- package/bin/go/src/internal/abi/compiletype.go +30 -0
- package/bin/go/src/internal/abi/iface.go +13 -1
- package/bin/go/src/internal/abi/map.go +21 -3
- package/bin/go/src/internal/abi/type.go +136 -27
- package/bin/go/src/internal/buildcfg/exp.go +8 -8
- package/bin/go/src/internal/buildcfg/zbootstrap.go +1 -1
- package/bin/go/src/internal/bytealg/bytealg.go +16 -16
- package/bin/go/src/internal/bytealg/compare_s390x.s +0 -24
- package/bin/go/src/internal/bytealg/equal_s390x.s +0 -18
- package/bin/go/src/internal/bytealg/indexbyte_arm64.s +28 -0
- package/bin/go/src/internal/bytealg/indexbyte_s390x.s +0 -33
- package/bin/go/src/internal/coverage/encodemeta/encode.go +1 -1
- package/bin/go/src/internal/cpu/cpu.go +22 -7
- package/bin/go/src/internal/cpu/cpu_arm64.go +8 -1
- package/bin/go/src/internal/cpu/cpu_arm64.s +7 -0
- package/bin/go/src/internal/cpu/cpu_arm64_darwin.go +2 -0
- package/bin/go/src/internal/cpu/cpu_arm64_freebsd.go +2 -1
- package/bin/go/src/internal/cpu/cpu_arm64_hwcap.go +2 -0
- package/bin/go/src/internal/cpu/cpu_arm64_openbsd.go +6 -1
- package/bin/go/src/internal/cpu/cpu_arm64_other.go +1 -1
- package/bin/go/src/internal/cpu/cpu_arm64_windows.go +26 -0
- package/bin/go/src/internal/cpu/cpu_loong64.go +14 -2
- package/bin/go/src/internal/cpu/cpu_riscv64.go +10 -0
- package/bin/go/src/internal/cpu/cpu_riscv64_linux.go +21 -0
- package/bin/go/src/internal/cpu/cpu_windows.go +20 -0
- package/bin/go/src/internal/cpu/cpu_x86.go +2 -0
- package/bin/go/src/internal/filepathlite/path_windows.go +30 -17
- package/bin/go/src/internal/fuzz/fuzz.go +5 -1
- package/bin/go/src/internal/fuzz/mutator.go +2 -2
- package/bin/go/src/internal/fuzz/worker.go +1 -1
- package/bin/go/src/internal/gate/gate.go +76 -0
- package/bin/go/src/internal/godebugs/table.go +29 -10
- package/bin/go/src/internal/goexperiment/exp_mapsplitgroup_off.go +8 -0
- package/bin/go/src/internal/goexperiment/exp_mapsplitgroup_on.go +8 -0
- package/bin/go/src/internal/goexperiment/flags.go +5 -3
- package/bin/go/src/internal/goversion/goversion.go +1 -1
- package/bin/go/src/internal/lazyregexp/lazyre.go +4 -0
- package/bin/go/src/internal/nettest/conn.go +437 -0
- package/bin/go/src/internal/nettest/listener.go +148 -0
- package/bin/go/src/internal/nettest/packetconn.go +250 -0
- package/bin/go/src/internal/nettest/queue.go +33 -0
- package/bin/go/src/internal/pkgbits/syncmarker_string.go +4 -4
- package/bin/go/src/internal/pkgbits/version.go +27 -1
- package/bin/go/src/internal/platform/supported.go +8 -10
- package/bin/go/src/internal/platform/zosarch.go +1 -3
- package/bin/go/src/internal/poll/fd_mutex.go +49 -10
- package/bin/go/src/internal/poll/fd_unix.go +6 -1
- package/bin/go/src/internal/poll/fd_windows.go +175 -191
- package/bin/go/src/internal/poll/fd_writev_libc.go +1 -1
- package/bin/go/src/internal/poll/fd_writev_unix.go +1 -1
- package/bin/go/src/internal/poll/file_plan9.go +4 -4
- package/bin/go/src/internal/poll/sendfile_windows.go +1 -3
- package/bin/go/src/internal/poll/splice_linux.go +1 -1
- package/bin/go/src/internal/profile/encode.go +1 -1
- package/bin/go/src/internal/profile/profile.go +5 -3
- package/bin/go/src/internal/profilerecord/profilerecord.go +2 -2
- package/bin/go/src/internal/reflectlite/value.go +1 -15
- package/bin/go/src/internal/runtime/atomic/atomic_386.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_amd64.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_andor_generic.go +0 -11
- package/bin/go/src/internal/runtime/atomic/atomic_arm.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_loong64.go +2 -2
- package/bin/go/src/internal/runtime/atomic/atomic_loong64.s +22 -11
- package/bin/go/src/internal/runtime/atomic/atomic_mipsx.go +0 -10
- package/bin/go/src/internal/runtime/atomic/atomic_riscv64.s +4 -4
- package/bin/go/src/internal/runtime/atomic/atomic_s390x.go +0 -6
- package/bin/go/src/internal/runtime/atomic/atomic_wasm.go +0 -31
- package/bin/go/src/internal/runtime/atomic/linkname.go +34 -0
- package/bin/go/src/internal/runtime/exithook/hooks.go +0 -4
- package/bin/go/src/internal/runtime/gc/scan/expand_amd64.s +2285 -2285
- package/bin/go/src/internal/runtime/gc/scan/mkasm.go +1 -1
- package/bin/go/src/internal/runtime/gc/scan/scan_amd64.go +2 -1
- package/bin/go/src/internal/runtime/gc/scan/scan_amd64.s +4 -2
- package/bin/go/src/internal/runtime/maps/group.go +22 -13
- package/bin/go/src/internal/runtime/maps/map.go +35 -14
- package/bin/go/src/internal/runtime/maps/memhash_386.s +408 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes.go +38 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes_asm.go +24 -0
- package/bin/go/src/internal/runtime/maps/memhash_aes_simd.go +49 -0
- package/bin/go/src/internal/runtime/maps/memhash_align_check.go +10 -0
- package/bin/go/src/internal/runtime/maps/memhash_align_nocheck.go +16 -0
- package/bin/go/src/internal/runtime/maps/memhash_amd64.s +426 -0
- package/bin/go/src/internal/runtime/maps/memhash_arm64.s +366 -0
- package/bin/go/src/internal/runtime/maps/memhash_noaes.go +43 -0
- package/bin/go/src/internal/runtime/maps/memhash_nosimd_amd64.s +33 -0
- package/bin/go/src/internal/runtime/maps/runtime.go +37 -88
- package/bin/go/src/internal/runtime/maps/runtime_alg.go +93 -0
- package/bin/go/src/internal/runtime/maps/runtime_fast32.go +111 -97
- package/bin/go/src/internal/runtime/maps/runtime_fast64.go +137 -98
- package/bin/go/src/internal/runtime/maps/runtime_faststr.go +96 -89
- package/bin/go/src/{runtime/hash32.go → internal/runtime/maps/runtime_hash32.go} +8 -10
- package/bin/go/src/{runtime/hash64.go → internal/runtime/maps/runtime_hash64.go} +8 -8
- package/bin/go/src/internal/runtime/maps/table.go +66 -3
- package/bin/go/src/internal/runtime/math/math.go +0 -21
- package/bin/go/src/internal/runtime/startlinetest/func_amd64.s +2 -1
- package/bin/go/src/internal/runtime/sys/dit_arm64.go +3 -0
- package/bin/go/src/internal/runtime/sys/dit_arm64.s +16 -3
- package/bin/go/src/internal/runtime/syscall/linux/asm_linux_s390x.s +0 -23
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_386.s +7 -4
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_amd64.s +10 -8
- package/bin/go/src/internal/runtime/syscall/windows/asm_windows_arm64.s +0 -1
- package/bin/go/src/internal/runtime/syscall/windows/defs_windows.go +4 -0
- package/bin/go/src/internal/runtime/syscall/windows/syscall_windows.go +7 -9
- package/bin/go/src/internal/strconv/atof.go +69 -42
- package/bin/go/src/internal/strconv/atoi.go +1 -0
- package/bin/go/src/internal/strconv/ftoa.go +329 -357
- package/bin/go/src/internal/strconv/itoa.go +53 -59
- package/bin/go/src/internal/strconv/pow10gen.go +15 -3
- package/bin/go/src/internal/strconv/pow10tab.go +670 -670
- package/bin/go/src/internal/strconv/uscale.go +290 -0
- package/bin/go/src/internal/stringslite/strings.go +14 -42
- package/bin/go/src/internal/syscall/unix/asm_openbsd.s +0 -2
- package/bin/go/src/internal/syscall/unix/at.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_fstatat.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_libc2.go +1 -1
- package/bin/go/src/internal/syscall/unix/at_openbsd.go +0 -2
- package/bin/go/src/internal/syscall/unix/faccessat_bsd.go +1 -1
- package/bin/go/src/internal/syscall/unix/faccessat_openbsd.go +0 -2
- package/bin/go/src/internal/syscall/windows/at_windows.go +5 -5
- package/bin/go/src/internal/syscall/windows/net_windows.go +1 -0
- package/bin/go/src/internal/syscall/windows/string_windows.go +6 -3
- package/bin/go/src/internal/syscall/windows/syscall_windows.go +2 -0
- package/bin/go/src/internal/syscall/windows/types_windows.go +89 -4
- package/bin/go/src/internal/syscall/windows/zsyscall_windows.go +7 -0
- package/bin/go/src/internal/testenv/testenv.go +24 -1
- package/bin/go/src/internal/trace/event.go +1 -1
- package/bin/go/src/internal/trace/tracev2/events.go +2 -0
- package/bin/go/src/internal/trace/traceviewer/pprof.go +1 -0
- package/bin/go/src/internal/types/errors/generrordocs.go +1 -1
- package/bin/go/src/io/fs/fs.go +4 -1
- package/bin/go/src/io/fs/glob.go +1 -1
- package/bin/go/src/io/fs/readdir.go +3 -3
- package/bin/go/src/io/fs/readfile.go +3 -3
- package/bin/go/src/io/fs/stat.go +1 -1
- package/bin/go/src/io/fs/sub.go +4 -2
- package/bin/go/src/iter/iter.go +2 -2
- package/bin/go/src/log/slog/handler.go +0 -1
- package/bin/go/src/log/slog/json_handler.go +7 -1
- package/bin/go/src/log/slog/logger.go +16 -0
- package/bin/go/src/log/slog/text_handler.go +10 -1
- package/bin/go/src/log/slog/value.go +1 -1
- package/bin/go/src/log/syslog/doc.go +5 -0
- package/bin/go/src/math/abs.go +1 -1
- package/bin/go/src/math/big/accuracy_string.go +4 -4
- package/bin/go/src/math/big/arith.go +1 -1
- package/bin/go/src/math/big/arith_loong64.s +2 -4
- package/bin/go/src/math/big/float.go +2 -0
- package/bin/go/src/math/big/ftoa.go +11 -5
- package/bin/go/src/math/big/int.go +84 -1
- package/bin/go/src/math/big/intconv.go +19 -4
- package/bin/go/src/math/big/internal/asmgen/loong64.go +2 -0
- package/bin/go/src/math/big/nat.go +68 -17
- package/bin/go/src/math/big/natdiv.go +8 -5
- package/bin/go/src/math/big/roundingmode_string.go +3 -2
- package/bin/go/src/math/copysign.go +1 -2
- package/bin/go/src/math/exp2_asm.go +1 -1
- package/bin/go/src/math/exp2_noasm.go +1 -1
- package/bin/go/src/math/exp_asm.go +1 -1
- package/bin/go/src/math/exp_loong64.s +4 -12
- package/bin/go/src/math/exp_noasm.go +1 -1
- package/bin/go/src/math/exp_riscv64.s +236 -0
- package/bin/go/src/math/nextafter.go +4 -2
- package/bin/go/src/math/pow10.go +1 -1
- package/bin/go/src/math/rand/v2/rand.go +14 -4
- package/bin/go/src/mime/type.go +3 -2
- package/bin/go/src/net/dial.go +10 -6
- package/bin/go/src/net/dnsclient_unix.go +37 -8
- package/bin/go/src/net/dnsconfig.go +6 -0
- package/bin/go/src/net/fd_plan9.go +13 -6
- package/bin/go/src/net/fd_unix.go +3 -7
- package/bin/go/src/net/fd_windows.go +4 -9
- package/bin/go/src/net/file_plan9.go +1 -1
- package/bin/go/src/net/file_posix.go +1 -5
- package/bin/go/src/net/http/client.go +21 -4
- package/bin/go/src/net/http/clientconn.go +20 -1
- package/bin/go/src/net/http/clone.go +1 -10
- package/bin/go/src/net/http/cookie.go +5 -6
- package/bin/go/src/net/http/cookiejar/jar.go +6 -4
- package/bin/go/src/net/http/fcgi/fcgi.go +1 -2
- package/bin/go/src/net/http/fs.go +8 -1
- package/bin/go/src/net/http/http.go +29 -12
- package/bin/go/src/net/http/http2.go +561 -0
- package/bin/go/src/net/http/httptest/server.go +305 -60
- package/bin/go/src/net/http/httptrace/trace.go +78 -27
- package/bin/go/src/net/http/httputil/reverseproxy.go +0 -30
- package/bin/go/src/net/http/internal/common.go +14 -0
- package/bin/go/src/net/http/internal/http2/api.go +161 -0
- package/bin/go/src/net/http/internal/http2/ascii.go +53 -0
- package/bin/go/src/net/http/internal/http2/ciphers.go +641 -0
- package/bin/go/src/net/http/internal/http2/client_conn_pool.go +285 -0
- package/bin/go/src/net/http/internal/http2/config.go +118 -0
- package/bin/go/src/net/http/internal/http2/databuffer.go +146 -0
- package/bin/go/src/net/http/internal/http2/errors.go +173 -0
- package/bin/go/src/net/http/internal/http2/flow.go +175 -0
- package/bin/go/src/net/http/internal/http2/frame.go +1905 -0
- package/bin/go/src/net/http/internal/http2/gotrack.go +181 -0
- package/bin/go/src/net/http/internal/http2/http2.go +403 -0
- package/bin/go/src/net/http/internal/http2/pipe.go +184 -0
- package/bin/go/src/net/http/internal/http2/server.go +3238 -0
- package/bin/go/src/net/http/internal/http2/transport.go +3267 -0
- package/bin/go/src/net/http/internal/http2/write.go +380 -0
- package/bin/go/src/net/http/internal/http2/writesched.go +289 -0
- package/bin/go/src/net/http/internal/http2/writesched_priority_rfc9218.go +224 -0
- package/bin/go/src/net/http/internal/http2/writesched_roundrobin.go +119 -0
- package/bin/go/src/net/http/internal/httpcommon/httpcommon.go +8 -0
- package/bin/go/src/net/http/internal/httpsfv/httpsfv.go +666 -0
- package/bin/go/src/net/http/internal/sniff.go +304 -0
- package/bin/go/src/net/http/omithttp2.go +28 -49
- package/bin/go/src/net/http/pprof/pprof.go +11 -17
- package/bin/go/src/net/http/request.go +30 -3
- package/bin/go/src/net/http/response.go +6 -2
- package/bin/go/src/net/http/server.go +366 -144
- package/bin/go/src/net/http/sniff.go +2 -289
- package/bin/go/src/net/http/transfer.go +64 -21
- package/bin/go/src/net/http/transport.go +288 -83
- package/bin/go/src/net/ip.go +4 -0
- package/bin/go/src/net/ipsock_plan9.go +4 -4
- package/bin/go/src/net/ipsock_posix.go +8 -2
- package/bin/go/src/net/lookup.go +10 -0
- package/bin/go/src/net/lookup_windows.go +1 -1
- package/bin/go/src/net/mail/message.go +8 -3
- package/bin/go/src/net/net.go +2 -0
- package/bin/go/src/net/netip/netip.go +68 -61
- package/bin/go/src/net/sock_posix.go +1 -4
- package/bin/go/src/net/textproto/reader.go +11 -3
- package/bin/go/src/net/udpsock_plan9.go +2 -7
- package/bin/go/src/net/unixsock.go +11 -3
- package/bin/go/src/net/url/url.go +33 -0
- package/bin/go/src/os/dir_darwin.go +7 -0
- package/bin/go/src/os/exec/exec.go +16 -2
- package/bin/go/src/os/exec.go +1 -0
- package/bin/go/src/os/file.go +8 -1
- package/bin/go/src/os/root_windows.go +5 -1
- package/bin/go/src/os/signal/doc.go +3 -2
- package/bin/go/src/os/signal/signal.go +18 -6
- package/bin/go/src/os/statat_unix.go +5 -1
- package/bin/go/src/path/filepath/path.go +4 -0
- package/bin/go/src/reflect/asm_s390x.s +0 -10
- package/bin/go/src/reflect/iter.go +13 -13
- package/bin/go/src/reflect/makefunc.go +2 -1
- package/bin/go/src/reflect/map.go +61 -18
- package/bin/go/src/reflect/type.go +63 -46
- package/bin/go/src/reflect/value.go +59 -16
- package/bin/go/src/regexp/exec.go +5 -5
- package/bin/go/src/regexp/regexp.go +382 -319
- package/bin/go/src/regexp/syntax/parse.go +19 -10
- package/bin/go/src/runtime/HACKING.md +19 -0
- package/bin/go/src/runtime/_mkmalloc/constants.go +6 -4
- package/bin/go/src/runtime/_mkmalloc/go.mod +1 -1
- package/bin/go/src/runtime/_mkmalloc/mkmalloc.go +405 -64
- package/bin/go/src/runtime/alg.go +21 -53
- package/bin/go/src/runtime/asm_386.s +11 -461
- package/bin/go/src/runtime/asm_amd64.s +30 -537
- package/bin/go/src/runtime/asm_arm.s +4 -39
- package/bin/go/src/runtime/asm_arm64.s +15 -428
- package/bin/go/src/runtime/asm_loong64.s +37 -47
- package/bin/go/src/runtime/asm_mips64x.s +15 -15
- package/bin/go/src/runtime/asm_mipsx.s +0 -15
- package/bin/go/src/runtime/asm_ppc64x.h +0 -16
- package/bin/go/src/runtime/asm_ppc64x.s +13 -59
- package/bin/go/src/runtime/asm_riscv64.s +30 -91
- package/bin/go/src/runtime/asm_s390x.s +49 -49
- package/bin/go/src/runtime/asm_wasm.s +0 -15
- package/bin/go/src/runtime/atomic_riscv64.s +1 -1
- package/bin/go/src/runtime/cgo/abi_riscv64.h +72 -0
- package/bin/go/src/runtime/cgo/asm_riscv64.s +7 -48
- package/bin/go/src/runtime/cgo/callbacks.go +0 -42
- package/bin/go/src/runtime/cgo/callbacks_unix.go +58 -0
- package/bin/go/src/runtime/cgo/cgo.go +6 -3
- package/bin/go/src/runtime/cgo/gcc_aix_ppc64.S +21 -9
- package/bin/go/src/runtime/cgo/gcc_android.c +0 -26
- package/bin/go/src/runtime/cgo/gcc_clearenv.c +1 -1
- package/bin/go/src/runtime/cgo/gcc_fatalf.c +14 -3
- package/bin/go/src/runtime/cgo/{gcc_libinit.c → gcc_libinit_unix.c} +18 -65
- package/bin/go/src/runtime/cgo/gcc_libinit_windows.c +23 -35
- package/bin/go/src/runtime/cgo/gcc_linux_ppc64x.S +16 -7
- package/bin/go/src/runtime/cgo/gcc_netbsd.c +8 -56
- package/bin/go/src/runtime/cgo/gcc_s390x.S +13 -4
- package/bin/go/src/runtime/cgo/gcc_sigaction.c +1 -1
- package/bin/go/src/runtime/cgo/gcc_unix.c +63 -0
- package/bin/go/src/runtime/cgo/gcc_util.c +0 -19
- package/bin/go/src/runtime/cgo/handle.go +3 -0
- package/bin/go/src/runtime/cgo/libcgo.h +7 -10
- package/bin/go/src/runtime/cgo/libcgo_unix.h +2 -10
- package/bin/go/src/runtime/cgo/pthread_unix.c +138 -0
- package/bin/go/src/runtime/cgo/sigaction.go +1 -1
- package/bin/go/src/runtime/cgo/windows.go +18 -1
- package/bin/go/src/runtime/cgo_ppc64x.go +1 -1
- package/bin/go/src/runtime/cgo_sigaction.go +1 -1
- package/bin/go/src/runtime/cgocall.go +10 -2
- package/bin/go/src/runtime/chan.go +2 -16
- package/bin/go/src/runtime/coro.go +2 -2
- package/bin/go/src/runtime/cpuflags.go +4 -3
- package/bin/go/src/runtime/debug/garbage.go +6 -6
- package/bin/go/src/runtime/debug/mod.go +1 -1
- package/bin/go/src/runtime/debug/stack.go +1 -1
- package/bin/go/src/runtime/debugcall.go +0 -3
- package/bin/go/src/runtime/error.go +6 -0
- package/bin/go/src/runtime/extern.go +5 -3
- package/bin/go/src/runtime/heapdump.go +1 -1
- package/bin/go/src/runtime/iface.go +20 -10
- package/bin/go/src/runtime/libinit.go +48 -0
- package/bin/go/src/runtime/lock_js.go +4 -2
- package/bin/go/src/runtime/lock_spinbit.go +13 -12
- package/bin/go/src/runtime/lock_wasip1.go +4 -2
- package/bin/go/src/runtime/lockrank.go +24 -21
- package/bin/go/src/runtime/lockrank_off.go +5 -2
- package/bin/go/src/runtime/lockrank_on.go +8 -7
- package/bin/go/src/runtime/malloc.go +10 -26
- package/bin/go/src/runtime/malloc_generated.go +819 -8628
- package/bin/go/src/runtime/malloc_stubs.go +187 -197
- package/bin/go/src/runtime/malloc_tables_generated.go +16 -882
- package/bin/go/src/runtime/map.go +4 -4
- package/bin/go/src/runtime/mbitmap.go +3 -1
- package/bin/go/src/runtime/mem.go +2 -6
- package/bin/go/src/runtime/mem_sbrk.go +4 -0
- package/bin/go/src/runtime/memclr_s390x.s +0 -5
- package/bin/go/src/runtime/memmove_s390x.s +0 -7
- package/bin/go/src/runtime/metrics/doc.go +5 -29
- package/bin/go/src/runtime/metrics/sample.go +3 -0
- package/bin/go/src/runtime/metrics.go +3 -2
- package/bin/go/src/runtime/mgc.go +41 -25
- package/bin/go/src/runtime/mgcmark.go +5 -0
- package/bin/go/src/runtime/mgcmark_greenteagc.go +1 -1
- package/bin/go/src/runtime/mgcpacer.go +1 -3
- package/bin/go/src/runtime/mgcscavenge.go +1 -1
- package/bin/go/src/runtime/mheap.go +1 -10
- package/bin/go/src/runtime/mklockrank.go +6 -1
- package/bin/go/src/runtime/mkpreempt.go +7 -0
- package/bin/go/src/runtime/mprof.go +12 -23
- package/bin/go/src/runtime/os2_aix.go +3 -3
- package/bin/go/src/runtime/os3_solaris.go +10 -0
- package/bin/go/src/runtime/os_aix.go +9 -2
- package/bin/go/src/runtime/os_darwin.go +3 -8
- package/bin/go/src/runtime/os_dragonfly.go +10 -0
- package/bin/go/src/runtime/os_js.go +10 -0
- package/bin/go/src/runtime/os_linux32.go +19 -6
- package/bin/go/src/runtime/os_netbsd.go +10 -0
- package/bin/go/src/runtime/os_openbsd.go +10 -0
- package/bin/go/src/runtime/os_plan9.go +10 -0
- package/bin/go/src/runtime/os_wasip1.go +10 -0
- package/bin/go/src/runtime/os_windows.go +45 -12
- package/bin/go/src/runtime/os_workdir_ios_arm64.go +98 -0
- package/bin/go/src/runtime/os_workdir_stub.go +9 -0
- package/bin/go/src/runtime/panic.go +93 -8
- package/bin/go/src/runtime/plugin.go +1 -3
- package/bin/go/src/runtime/pprof/pprof.go +11 -14
- package/bin/go/src/runtime/pprof/protomem.go +8 -15
- package/bin/go/src/runtime/preempt_loong64.s +8 -4
- package/bin/go/src/runtime/preempt_noxreg.go +2 -0
- package/bin/go/src/runtime/preempt_xreg.go +29 -2
- package/bin/go/src/runtime/print.go +9 -1
- package/bin/go/src/runtime/proc.go +68 -17
- package/bin/go/src/runtime/race_riscv64.s +40 -83
- package/bin/go/src/runtime/race_s390x.s +0 -16
- package/bin/go/src/runtime/rand.go +40 -12
- package/bin/go/src/runtime/{rt0_linux_ppc64le.s → rt0_linux_ppc64x.s} +12 -2
- package/bin/go/src/runtime/runtime-gdb.py +13 -2
- package/bin/go/src/runtime/runtime1.go +69 -18
- package/bin/go/src/runtime/runtime2.go +23 -22
- package/bin/go/src/runtime/secret/secret.go +7 -2
- package/bin/go/src/runtime/secret.go +27 -9
- package/bin/go/src/runtime/secret_nosecret.go +1 -1
- package/bin/go/src/runtime/sigaction.go +1 -1
- package/bin/go/src/runtime/signal_unix.go +5 -3
- package/bin/go/src/runtime/softfloat64.go +7 -2
- package/bin/go/src/runtime/string.go +4 -1
- package/bin/go/src/runtime/stubs.go +14 -4
- package/bin/go/src/runtime/stubs_amd64.go +4 -0
- package/bin/go/src/runtime/stubs_arm.go +10 -1
- package/bin/go/src/runtime/stubs_arm64.go +13 -0
- package/bin/go/src/runtime/stubs_loong64.go +18 -0
- package/bin/go/src/runtime/stubs_mips64x.go +9 -0
- package/bin/go/src/runtime/stubs_mipsx.go +11 -0
- package/bin/go/src/runtime/stubs_ppc64x.go +15 -0
- package/bin/go/src/runtime/stubs_riscv64.go +13 -0
- package/bin/go/src/runtime/stubs_s390x.go +18 -0
- package/bin/go/src/runtime/symtab.go +15 -16
- package/bin/go/src/runtime/synctest.go +2 -4
- package/bin/go/src/runtime/sys_aix_ppc64.s +9 -0
- package/bin/go/src/runtime/sys_darwin.go +2 -20
- package/bin/go/src/runtime/sys_darwin_amd64.s +1 -4
- package/bin/go/src/runtime/sys_darwin_arm64.s +3 -6
- package/bin/go/src/runtime/sys_freebsd_riscv64.s +2 -2
- package/bin/go/src/runtime/sys_ios_arm64.go +151 -0
- package/bin/go/src/runtime/sys_ios_arm64.s +78 -0
- package/bin/go/src/runtime/sys_linux_amd64.s +7 -1
- package/bin/go/src/runtime/sys_linux_loong64.s +8 -14
- package/bin/go/src/runtime/sys_linux_ppc64x.s +0 -12
- package/bin/go/src/runtime/sys_linux_riscv64.s +2 -2
- package/bin/go/src/runtime/sys_openbsd.go +1 -1
- package/bin/go/src/runtime/sys_openbsd_riscv64.s +16 -16
- package/bin/go/src/runtime/syscall_windows.go +2 -6
- package/bin/go/src/runtime/time.go +19 -57
- package/bin/go/src/runtime/trace/subscribe.go +0 -3
- package/bin/go/src/runtime/traceback.go +90 -13
- package/bin/go/src/runtime/traceregion.go +3 -3
- package/bin/go/src/runtime/tracestring.go +5 -0
- package/bin/go/src/runtime/type.go +85 -15
- package/bin/go/src/runtime/utf8.go +2 -2
- package/bin/go/src/simd/archsimd/_gen/go.mod +2 -2
- package/bin/go/src/simd/archsimd/_gen/go.sum +2 -2
- package/bin/go/src/simd/archsimd/_gen/main.go +106 -15
- package/bin/go/src/simd/archsimd/_gen/midway/comments.yaml +151 -0
- package/bin/go/src/simd/archsimd/_gen/midway/intersect_simd_ops.go +836 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/asbits.go +139 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/compare_natural.go +73 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/formatted_files.go +66 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/insert_ordered_map.go +159 -0
- package/bin/go/src/simd/archsimd/_gen/sgutil/merge_generic_ops.go +245 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arch.go +173 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/emit.go +166 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/instruction.go +642 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/load.go +54 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/arm64/operands.go +406 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/etetest.sh +1 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdGenericOps.go +19 -52
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdIntrinsics.go +162 -98
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdMachineOps.go +50 -19
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdTypes.go +198 -140
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdrules.go +278 -57
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_simdssa.go +133 -68
- package/bin/go/src/simd/archsimd/_gen/simdgen/gen_utility.go +163 -30
- package/bin/go/src/simd/archsimd/_gen/simdgen/go_amd64.yaml +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/go_arm64.yaml +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/godefs.go +113 -15
- package/bin/go/src/simd/archsimd/_gen/simdgen/main.go +62 -17
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/categories.yaml +12 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/{go.yaml → go_amd64.yaml} +12 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/AddSub/go_arm64.yaml +91 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/categories.yaml +11 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/go_arm64.yaml +43 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Compares/go_arm64.yaml +81 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/categories.yaml +11 -6
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/{go.yaml → go_amd64.yaml} +8 -8
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Converts/go_arm64.yaml +358 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/categories.yaml +5 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/{go.yaml → go_amd64.yaml} +4 -4
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/FPonlyArith/go_arm64.yaml +52 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/categories.yaml +29 -11
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/{go.yaml → go_amd64.yaml} +1 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/GaloisField/go_arm64.yaml +10 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/categories.yaml +2 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/{go.yaml → go_amd64.yaml} +2 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/IntOnlyArith/go_arm64.yaml +35 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/categories.yaml +5 -8
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/{go.yaml → go_amd64.yaml} +7 -5
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MLOps/go_arm64.yaml +31 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MinMax/go_arm64.yaml +61 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/categories.yaml +79 -23
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/{go.yaml → go_amd64.yaml} +213 -104
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Moves/go_arm64.yaml +264 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/categories.yaml +6 -2
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/{go.yaml → go_amd64.yaml} +3 -3
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Mul/go_arm64.yaml +38 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/NegAbs/categories.yaml +7 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/NegAbs/go_arm64.yaml +36 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/categories.yaml +5 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/go_arm64.yaml +19 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Reduce/categories.yaml +16 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Reduce/go_arm64.yaml +71 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/categories.yaml +156 -41
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go_amd64.yaml +299 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go_arm64.yaml +202 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/types.yaml +2 -0
- package/bin/go/src/simd/archsimd/_gen/simdgen/xed.go +44 -11
- package/bin/go/src/simd/archsimd/_gen/tmplgen/main.go +668 -123
- package/bin/go/src/simd/archsimd/_gen/unify/closure.go +1 -1
- package/bin/go/src/simd/archsimd/_gen/unify/env.go +35 -3
- package/bin/go/src/simd/archsimd/_gen/unify/yaml.go +4 -4
- package/bin/go/src/simd/archsimd/_gen/wasmgen/main.go +2064 -0
- package/bin/go/src/simd/archsimd/clmul_arm64.go +79 -0
- package/bin/go/src/simd/archsimd/clmul_emulated.go +103 -0
- package/bin/go/src/simd/archsimd/compare_gen_arm64.go +155 -0
- package/bin/go/src/simd/archsimd/cpu.go +1 -1
- package/bin/go/src/simd/archsimd/cpu_other.go +21 -0
- package/bin/go/src/simd/archsimd/doc.go +0 -2
- package/bin/go/src/simd/archsimd/dummy.s +1 -1
- package/bin/go/src/simd/archsimd/generate.go +1 -1
- package/bin/go/src/simd/archsimd/internal/test_helpers/checkslices.go +2 -2
- package/bin/go/src/simd/archsimd/maskmerge_gen_amd64.go +330 -0
- package/bin/go/src/simd/archsimd/maskmerge_gen_arm64.go +167 -0
- package/bin/go/src/simd/archsimd/ops_amd64.go +4210 -2475
- package/bin/go/src/simd/archsimd/ops_arm64.go +2186 -0
- package/bin/go/src/simd/archsimd/ops_emulated_amd64.go +205 -0
- package/bin/go/src/simd/archsimd/ops_emulated_wasm.go +212 -0
- package/bin/go/src/simd/archsimd/ops_internal_amd64.go +500 -56
- package/bin/go/src/simd/archsimd/ops_internal_arm64.go +234 -0
- package/bin/go/src/simd/archsimd/ops_wasm.go +1795 -0
- package/bin/go/src/simd/archsimd/other_gen_amd64.go +576 -72
- package/bin/go/src/simd/archsimd/other_gen_arm64.go +519 -0
- package/bin/go/src/simd/archsimd/shuffles_amd64.go +217 -76
- package/bin/go/src/simd/archsimd/slice_gen_amd64.go +594 -532
- package/bin/go/src/simd/archsimd/slice_gen_arm64.go +125 -0
- package/bin/go/src/simd/archsimd/slicepart_128.go +302 -0
- package/bin/go/src/simd/archsimd/slicepart_amd64.go +36 -235
- package/bin/go/src/simd/archsimd/slicepart_arm64.go +217 -0
- package/bin/go/src/simd/archsimd/slicepart_wasm.go +217 -0
- package/bin/go/src/simd/archsimd/string.go +1 -1
- package/bin/go/src/simd/archsimd/types_amd64.go +165 -341
- package/bin/go/src/simd/archsimd/types_arm64.go +224 -0
- package/bin/go/src/simd/archsimd/types_wasm.go +354 -0
- package/bin/go/src/simd/archsimd/unsafe_helpers.go +60 -0
- package/bin/go/src/simd/doc.go +91 -0
- package/bin/go/src/simd/dummy.s +7 -0
- package/bin/go/src/simd/internal/bridge/decls_amd64.go +4085 -0
- package/bin/go/src/simd/internal/bridge/decls_arm64.go +1369 -0
- package/bin/go/src/simd/internal/bridge/decls_wasm.go +1369 -0
- package/bin/go/src/simd/internal/bridge/import_hook.go +13 -0
- package/bin/go/src/simd/internal/bridge/simd_emulated.go +3275 -0
- package/bin/go/src/simd/internal/bridge/simd_types_emulated.go +95 -0
- package/bin/go/src/simd/internal/bridge/tofrom_128.go +65 -0
- package/bin/go/src/simd/internal/bridge/tofrom_amd64.go +123 -0
- package/bin/go/src/simd/internal/bridge/tofrom_emulated.go +63 -0
- package/bin/go/src/simd/midway_amd64.go +34 -0
- package/bin/go/src/simd/midway_arm64.go +22 -0
- package/bin/go/src/simd/midway_common.go +138 -0
- package/bin/go/src/simd/midway_wasm.go +13 -0
- package/bin/go/src/simd/simd_emulated.go +3275 -0
- package/bin/go/src/simd/simd_stubs.go +1041 -0
- package/bin/go/src/simd/simd_types.go +96 -0
- package/bin/go/src/simd/tofrom_amd64.go +374 -0
- package/bin/go/src/simd/tofrom_arm64.go +290 -0
- package/bin/go/src/simd/tofrom_wasm.go +290 -0
- package/bin/go/src/slices/slices.go +9 -7
- package/bin/go/src/strconv/isprint.go +81 -51
- package/bin/go/src/strings/builder.go +1 -1
- package/bin/go/src/strings/strings.go +44 -35
- package/bin/go/src/sync/atomic/doc.go +7 -0
- package/bin/go/src/sync/cond.go +4 -2
- package/bin/go/src/sync/pool.go +6 -15
- package/bin/go/src/sync/runtime2_lockrank.go +1 -2
- package/bin/go/src/syscall/exec_bsd.go +3 -3
- package/bin/go/src/syscall/exec_libc2.go +1 -1
- package/bin/go/src/syscall/exec_linux.go +7 -2
- package/bin/go/src/syscall/fs_js.go +9 -4
- package/bin/go/src/syscall/fs_wasip1.go +6 -0
- package/bin/go/src/syscall/js/js.go +2 -2
- package/bin/go/src/syscall/linkname_bsd.go +8 -0
- package/bin/go/src/syscall/linkname_libc.go +1 -1
- package/bin/go/src/syscall/linkname_openbsd.go +0 -2
- package/bin/go/src/syscall/mkall.sh +6 -17
- package/bin/go/src/syscall/syscall_aix.go +5 -0
- package/bin/go/src/syscall/syscall_linux_386.go +9 -0
- package/bin/go/src/syscall/syscall_linux_amd64.go +5 -0
- package/bin/go/src/syscall/syscall_linux_arm.go +4 -0
- package/bin/go/src/syscall/syscall_linux_arm64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_loong64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_mipsx.go +4 -0
- package/bin/go/src/syscall/syscall_linux_riscv64.go +3 -0
- package/bin/go/src/syscall/syscall_linux_s390x.go +5 -0
- package/bin/go/src/syscall/syscall_openbsd.go +77 -2
- package/bin/go/src/syscall/syscall_plan9.go +25 -0
- package/bin/go/src/syscall/syscall_solaris.go +11 -0
- package/bin/go/src/syscall/syscall_unix.go +19 -0
- package/bin/go/src/syscall/syscall_windows.go +1 -1
- package/bin/go/src/testing/synctest/synctest.go +21 -0
- package/bin/go/src/testing/testing.go +211 -52
- package/bin/go/src/text/template/parse/lex.go +6 -6
- package/bin/go/src/text/template/parse/node.go +21 -16
- package/bin/go/src/text/template/parse/parse.go +23 -6
- package/bin/go/src/text/template/template.go +5 -3
- package/bin/go/src/time/format.go +3 -0
- package/bin/go/src/time/sleep.go +0 -33
- package/bin/go/src/time/tick.go +3 -2
- package/bin/go/src/time/time.go +2 -2
- package/bin/go/src/time/tzdata/zzipdata.go +1 -1
- package/bin/go/src/time/zoneinfo.go +5 -4
- package/bin/go/src/time/zoneinfo_read.go +1 -1
- package/bin/go/src/unicode/tables.go +898 -417
- package/bin/go/src/uuid/uuid.go +273 -0
- package/bin/go/src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.go +3 -3
- package/bin/go/src/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s +2066 -6598
- package/bin/go/src/vendor/golang.org/x/crypto/hkdf/hkdf.go +100 -0
- package/bin/go/src/vendor/golang.org/x/net/dns/dnsmessage/message.go +5 -4
- package/bin/go/src/vendor/golang.org/x/net/http/httpproxy/proxy.go +4 -4
- package/bin/go/src/vendor/golang.org/x/net/http3/http3.go +46 -0
- package/bin/go/src/vendor/golang.org/x/net/idna/{idna10.0.0.go → idna.go} +133 -35
- package/bin/go/src/vendor/golang.org/x/net/idna/punycode.go +4 -1
- package/bin/go/src/vendor/golang.org/x/net/idna/tables15.0.0.go +1 -1
- package/bin/go/src/vendor/golang.org/x/net/idna/tables17.0.0.go +5302 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/body.go +231 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/conn.go +131 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/doc.go +10 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/errors.go +102 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/http3.go +95 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack.go +356 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_decode.go +81 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_encode.go +61 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/qpack_static.go +142 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/quic.go +40 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/roundtrip.go +423 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/server.go +866 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/settings.go +66 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/stream.go +260 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/transport.go +333 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/http3/varint.go +23 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/ascii.go +53 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/headermap.go +115 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/httpcommon/request.go +475 -0
- package/bin/go/src/vendor/golang.org/x/net/internal/quic/quicwire/wire.go +150 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/ack_delay.go +26 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/acks.go +213 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/atomic_bits.go +31 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/config.go +158 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/congestion_reno.go +306 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn.go +434 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_close.go +340 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_flow.go +142 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_id.go +502 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_loss.go +85 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_recv.go +631 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_send.go +407 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/conn_streams.go +483 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/crypto_stream.go +157 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/dgram.go +53 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/doc.go +50 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/endpoint.go +478 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/errors.go +129 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/frame_debug.go +730 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/gate.go +86 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/idle.go +168 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/log.go +67 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/loss.go +521 -0
- package/bin/go/src/{runtime/cgo/gcc_stack_windows.c → vendor/golang.org/x/net/quic/math.go} +7 -2
- package/bin/go/src/vendor/golang.org/x/net/quic/pacer.go +129 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet.go +267 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_number.go +72 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_parser.go +519 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_protection.go +539 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/packet_writer.go +566 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/path.go +87 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/ping.go +14 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/pipe.go +173 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/qlog.go +272 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/queue.go +63 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/quic.go +221 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/race_disabled.go +10 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/race_enabled.go +27 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/rangeset.go +193 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/retry.go +240 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/rtt.go +71 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_packet.go +119 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_packet_list.go +93 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/sent_val.go +103 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/skip.go +62 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stateless_reset.go +59 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stream.go +1106 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/stream_limits.go +138 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/tls.go +123 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/transport_params.go +283 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp.go +28 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_darwin.go +45 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_linux.go +39 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_msg.go +245 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_other.go +62 -0
- package/bin/go/src/vendor/golang.org/x/net/quic/udp_packetconn.go +67 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/asm_darwin_arm64_gc.s +12 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu.go +12 -7
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_arm64.go +3 -6
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64.go +67 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_darwin_arm64_other.go +31 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go +1 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go +2 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_loong64.go +14 -2
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go +4 -2
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +1 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_windows.go +26 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_windows_arm64.go +38 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/cpu_x86.go +124 -50
- package/bin/go/src/vendor/golang.org/x/sys/cpu/syscall_darwin_arm64_gc.go +54 -0
- package/bin/go/src/vendor/golang.org/x/sys/cpu/zcpu_windows.go +48 -0
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule.go +4 -0
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables15.0.0.go +1 -1
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables17.0.0.go +2135 -0
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/forminfo.go +18 -8
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables15.0.0.go +1410 -1410
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/{tables13.0.0.go → tables17.0.0.go} +3530 -3186
- package/bin/go/src/vendor/modules.txt +14 -8
- package/bin/ttsc-cache.exe +0 -0
- package/bin/ttsc.exe +0 -0
- package/bin/ttscserver.exe +0 -0
- package/package.json +1 -1
- package/bin/go/src/crypto/internal/fips140/nistec/p256_ordinv_noasm.go +0 -13
- package/bin/go/src/go/internal/scannerhooks/hooks.go +0 -11
- package/bin/go/src/hash/maphash/maphash_purego.go +0 -200
- package/bin/go/src/hash/maphash/maphash_runtime.go +0 -64
- package/bin/go/src/internal/goexperiment/exp_goroutineleakprofile_off.go +0 -8
- package/bin/go/src/internal/goexperiment/exp_goroutineleakprofile_on.go +0 -8
- package/bin/go/src/internal/strconv/atofeisel.go +0 -166
- package/bin/go/src/internal/strconv/ftoadbox.go +0 -349
- package/bin/go/src/internal/strconv/ftoafixed.go +0 -184
- package/bin/go/src/internal/strconv/math.go +0 -179
- package/bin/go/src/net/http/h2_bundle.go +0 -12371
- package/bin/go/src/net/http/h2_error.go +0 -37
- package/bin/go/src/runtime/cgo/gcc_darwin_amd64.c +0 -61
- package/bin/go/src/runtime/cgo/gcc_darwin_arm64.c +0 -148
- package/bin/go/src/runtime/cgo/gcc_dragonfly_amd64.c +0 -61
- package/bin/go/src/runtime/cgo/gcc_freebsd.c +0 -72
- package/bin/go/src/runtime/cgo/gcc_freebsd_amd64.c +0 -72
- package/bin/go/src/runtime/cgo/gcc_linux.c +0 -67
- package/bin/go/src/runtime/cgo/gcc_linux_amd64.c +0 -92
- package/bin/go/src/runtime/cgo/gcc_linux_arm64.c +0 -88
- package/bin/go/src/runtime/cgo/gcc_linux_s390x.c +0 -64
- package/bin/go/src/runtime/cgo/gcc_openbsd.c +0 -62
- package/bin/go/src/runtime/cgo/gcc_ppc64x.c +0 -68
- package/bin/go/src/runtime/cgo/gcc_signal2_ios_arm64.c +0 -11
- package/bin/go/src/runtime/cgo/gcc_signal_ios_arm64.c +0 -213
- package/bin/go/src/runtime/cgo/gcc_signal_ios_nolldb.c +0 -10
- package/bin/go/src/runtime/cgo/gcc_solaris_amd64.c +0 -83
- package/bin/go/src/runtime/cgo/gcc_stack_darwin.c +0 -25
- package/bin/go/src/runtime/cgo/gcc_stack_unix.c +0 -48
- package/bin/go/src/runtime/cgo/gcc_windows_386.c +0 -55
- package/bin/go/src/runtime/cgo/gcc_windows_amd64.c +0 -54
- package/bin/go/src/runtime/cgo/gcc_windows_arm64.c +0 -42
- package/bin/go/src/runtime/cgo/libcgo_windows.h +0 -6
- package/bin/go/src/runtime/cgo/signal_ios_arm64.go +0 -10
- package/bin/go/src/runtime/cgo/signal_ios_arm64.s +0 -56
- package/bin/go/src/runtime/rt0_linux_ppc64.s +0 -28
- package/bin/go/src/runtime/stubs_ppc64.go +0 -12
- package/bin/go/src/simd/archsimd/_gen/simdgen/go.yaml +0 -1
- package/bin/go/src/simd/archsimd/_gen/simdgen/ops/ShiftRotate/go.yaml +0 -172
- package/bin/go/src/syscall/asm_openbsd_mips64.s +0 -129
- package/bin/go/src/syscall/syscall_openbsd1.go +0 -12
- package/bin/go/src/syscall/syscall_openbsd_libc.go +0 -84
- package/bin/go/src/syscall/syscall_openbsd_mips64.go +0 -43
- package/bin/go/src/syscall/zerrors_openbsd_mips64.go +0 -1682
- package/bin/go/src/syscall/zsyscall_openbsd_mips64.go +0 -1289
- package/bin/go/src/syscall/zsysnum_openbsd_mips64.go +0 -218
- package/bin/go/src/syscall/ztypes_openbsd_mips64.go +0 -443
- package/bin/go/src/vendor/golang.org/x/net/idna/go118.go +0 -13
- package/bin/go/src/vendor/golang.org/x/net/idna/idna9.0.0.go +0 -717
- package/bin/go/src/vendor/golang.org/x/net/idna/pre_go118.go +0 -11
- package/bin/go/src/vendor/golang.org/x/net/idna/tables10.0.0.go +0 -4559
- package/bin/go/src/vendor/golang.org/x/net/idna/tables11.0.0.go +0 -4653
- package/bin/go/src/vendor/golang.org/x/net/idna/tables12.0.0.go +0 -4733
- package/bin/go/src/vendor/golang.org/x/net/idna/tables13.0.0.go +0 -4959
- package/bin/go/src/vendor/golang.org/x/net/idna/tables9.0.0.go +0 -4486
- package/bin/go/src/vendor/golang.org/x/net/idna/trie12.0.0.go +0 -30
- package/bin/go/src/vendor/golang.org/x/net/idna/trie13.0.0.go +0 -30
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go +0 -11
- package/bin/go/src/vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go +0 -14
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables10.0.0.go +0 -1815
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables11.0.0.go +0 -1887
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables12.0.0.go +0 -1923
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables13.0.0.go +0 -1955
- package/bin/go/src/vendor/golang.org/x/text/unicode/bidi/tables9.0.0.go +0 -1781
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables10.0.0.go +0 -7657
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables11.0.0.go +0 -7693
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables12.0.0.go +0 -7710
- package/bin/go/src/vendor/golang.org/x/text/unicode/norm/tables9.0.0.go +0 -7637
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/BitwiseLogic/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Compares/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/MinMax/{go.yaml → go_amd64.yaml} +0 -0
- /package/bin/go/src/simd/archsimd/_gen/simdgen/ops/Others/{go.yaml → go_amd64.yaml} +0 -0
|
@@ -9,6 +9,7 @@ import (
|
|
|
9
9
|
"fmt"
|
|
10
10
|
"io"
|
|
11
11
|
"math"
|
|
12
|
+
"slices"
|
|
12
13
|
)
|
|
13
14
|
|
|
14
15
|
const (
|
|
@@ -30,147 +31,166 @@ const (
|
|
|
30
31
|
)
|
|
31
32
|
|
|
32
33
|
const (
|
|
33
|
-
logWindowSize
|
|
34
|
-
windowSize
|
|
35
|
-
windowMask
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
//
|
|
39
|
-
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
//
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
maxMatchLength = 258 // The largest match length
|
|
46
|
-
baseMatchOffset = 1 // The smallest match offset
|
|
47
|
-
maxMatchOffset = 1 << 15 // The largest match offset
|
|
48
|
-
|
|
49
|
-
// The maximum number of tokens we put into a single flate block, just to
|
|
50
|
-
// stop things from getting too large.
|
|
51
|
-
maxFlateBlockTokens = 1 << 14
|
|
34
|
+
logWindowSize = 15
|
|
35
|
+
windowSize = 1 << logWindowSize
|
|
36
|
+
windowMask = windowSize - 1
|
|
37
|
+
minMatchLength = 4 // The smallest match that the compressor looks for
|
|
38
|
+
maxMatchLength = 258 // The longest match for the compressor
|
|
39
|
+
minOffsetSize = 1 // The shortest offset that makes any sense
|
|
40
|
+
|
|
41
|
+
// The maximum number of tokens we will encode at the time.
|
|
42
|
+
// Smaller sizes usually creates less optimal blocks.
|
|
43
|
+
// Bigger can make context switching slow.
|
|
44
|
+
// We use this for levels 7-9, so we make it big.
|
|
45
|
+
maxFlateBlockTokens = 1 << 15
|
|
52
46
|
maxStoreBlockSize = 65535
|
|
53
47
|
hashBits = 17 // After 17 performance degrades
|
|
54
48
|
hashSize = 1 << hashBits
|
|
55
49
|
hashMask = (1 << hashBits) - 1
|
|
56
|
-
maxHashOffset = 1 <<
|
|
50
|
+
maxHashOffset = 1 << 28
|
|
57
51
|
|
|
58
52
|
skipNever = math.MaxInt32
|
|
59
53
|
)
|
|
60
54
|
|
|
55
|
+
// compressionLevel holds the parameters for levels 7-9.
|
|
61
56
|
type compressionLevel struct {
|
|
62
|
-
|
|
57
|
+
good int32 // "good enough" match length
|
|
58
|
+
lazy int32 // don't try to find a later, better match above this length
|
|
59
|
+
nice int32 // stop looking for a better match above this length
|
|
60
|
+
chain int32 // maximum number of hash chain entries to search
|
|
61
|
+
level int
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
var levels = []compressionLevel{
|
|
66
|
-
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
{
|
|
71
|
-
|
|
65
|
+
{}, // 0
|
|
66
|
+
// Level 1-6 uses specialized algorithm - values not used
|
|
67
|
+
{0, 0, 0, 0, 1},
|
|
68
|
+
{0, 0, 0, 0, 2},
|
|
69
|
+
{0, 0, 0, 0, 3},
|
|
70
|
+
{0, 0, 0, 0, 4},
|
|
71
|
+
{0, 0, 0, 0, 5},
|
|
72
|
+
{0, 0, 0, 0, 6},
|
|
73
|
+
// Levels 7-9 use increasingly more lazy matching
|
|
72
74
|
// and increasingly stringent conditions for "good enough".
|
|
73
|
-
{
|
|
74
|
-
{
|
|
75
|
-
{
|
|
76
|
-
{7, 8, 32, 128, 256, skipNever},
|
|
77
|
-
{8, 32, 128, 258, 1024, skipNever},
|
|
78
|
-
{9, 32, 258, 258, 4096, skipNever},
|
|
75
|
+
{8, 12, 16, 24, 7},
|
|
76
|
+
{16, 30, 40, 64, 8},
|
|
77
|
+
{32, 258, 258, 1024, 9},
|
|
79
78
|
}
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
// advancedState contains state for levels 7-9, with bigger hash tables, etc.
|
|
81
|
+
type advancedState struct {
|
|
82
|
+
// deflate state
|
|
83
|
+
length int32
|
|
84
|
+
offset int32
|
|
85
|
+
maxInsertIndex int32
|
|
86
|
+
chainHead int32
|
|
87
|
+
hashOffset int32
|
|
86
88
|
|
|
87
|
-
//
|
|
88
|
-
fill func(*compressor, []byte) int // copy data to window
|
|
89
|
-
step func(*compressor) // process window
|
|
90
|
-
bestSpeed *deflateFast // Encoder for BestSpeed
|
|
89
|
+
literalCounter uint16 // consecutive literal count; overflows to reset after 64KB.
|
|
91
90
|
|
|
92
91
|
// input window: unprocessed data is window[index:windowEnd]
|
|
93
|
-
index
|
|
94
|
-
|
|
95
|
-
windowEnd int
|
|
96
|
-
blockStart int // window index where current tokens start
|
|
97
|
-
byteAvailable bool // if true, still need to process window[index-1].
|
|
98
|
-
|
|
99
|
-
sync bool // requesting flush
|
|
100
|
-
|
|
101
|
-
// queued output tokens
|
|
102
|
-
tokens []token
|
|
103
|
-
|
|
104
|
-
// deflate state
|
|
105
|
-
length int
|
|
106
|
-
offset int
|
|
107
|
-
maxInsertIndex int
|
|
108
|
-
err error
|
|
92
|
+
index int32
|
|
93
|
+
hashMatch [maxMatchLength + minMatchLength]uint32
|
|
109
94
|
|
|
110
95
|
// Input hash chains
|
|
111
96
|
// hashHead[hashValue] contains the largest inputIndex with the specified hash value
|
|
112
97
|
// If hashHead[hashValue] is within the current window, then
|
|
113
98
|
// hashPrev[hashHead[hashValue] & windowMask] contains the previous index
|
|
114
99
|
// with the same hash value.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
hashHead [hashSize]uint32
|
|
119
|
-
hashPrev [windowSize]uint32
|
|
120
|
-
hashOffset int
|
|
100
|
+
hashHead [hashSize]int32
|
|
101
|
+
hashPrev [windowSize]int32
|
|
102
|
+
}
|
|
121
103
|
|
|
122
|
-
|
|
123
|
-
|
|
104
|
+
type compressor struct {
|
|
105
|
+
compressionLevel
|
|
106
|
+
|
|
107
|
+
h *huffmanEncoder // huffman encoder, with state
|
|
108
|
+
w *huffmanBitWriter // writer for blocks
|
|
109
|
+
|
|
110
|
+
// compression algorithm
|
|
111
|
+
fill func(*compressor, []byte) int // copy data to window
|
|
112
|
+
step func(*compressor) // process window
|
|
113
|
+
|
|
114
|
+
window []byte // current window - size depends on encoder level
|
|
115
|
+
windowEnd int32 // filled bytes in window
|
|
116
|
+
blockStart int32 // window index where current tokens start
|
|
117
|
+
err error // stateful error
|
|
118
|
+
|
|
119
|
+
// queued output tokens
|
|
120
|
+
tokens tokens // tokens store for each block
|
|
121
|
+
fast fastEnc // encoder to use for blocks
|
|
122
|
+
state *advancedState // chained encoder for level 7-9
|
|
123
|
+
|
|
124
|
+
sync bool // requesting flush
|
|
125
|
+
byteAvailable bool // if true, still need to process window[index-1].
|
|
124
126
|
}
|
|
125
127
|
|
|
128
|
+
// fillDeflate will add b to the current window for levels 7-9.
|
|
126
129
|
func (d *compressor) fillDeflate(b []byte) int {
|
|
127
|
-
|
|
130
|
+
s := d.state
|
|
131
|
+
if s.index >= 2*windowSize-(minMatchLength+maxMatchLength) {
|
|
128
132
|
// shift the window by windowSize
|
|
129
|
-
copy(d.window, d.window[windowSize:2*windowSize])
|
|
130
|
-
|
|
133
|
+
copy(d.window[:], d.window[windowSize:2*windowSize])
|
|
134
|
+
s.index -= windowSize
|
|
131
135
|
d.windowEnd -= windowSize
|
|
132
136
|
if d.blockStart >= windowSize {
|
|
133
137
|
d.blockStart -= windowSize
|
|
134
138
|
} else {
|
|
135
139
|
d.blockStart = math.MaxInt32
|
|
136
140
|
}
|
|
137
|
-
|
|
138
|
-
if
|
|
139
|
-
delta :=
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
for i, v := range d.hashPrev[:] {
|
|
146
|
-
if int(v) > delta {
|
|
147
|
-
d.hashPrev[i] = uint32(int(v) - delta)
|
|
148
|
-
} else {
|
|
149
|
-
d.hashPrev[i] = 0
|
|
150
|
-
}
|
|
141
|
+
s.hashOffset += windowSize
|
|
142
|
+
if s.hashOffset > maxHashOffset {
|
|
143
|
+
delta := s.hashOffset - 1
|
|
144
|
+
s.hashOffset -= delta
|
|
145
|
+
s.chainHead -= delta
|
|
146
|
+
// Note: range over &array to avoid copy (see go.dev/issue/18625).
|
|
147
|
+
for i, v := range &s.hashPrev {
|
|
148
|
+
s.hashPrev[i] = max(v-delta, 0)
|
|
151
149
|
}
|
|
152
|
-
for i, v := range
|
|
153
|
-
|
|
154
|
-
d.hashHead[i] = uint32(int(v) - delta)
|
|
155
|
-
} else {
|
|
156
|
-
d.hashHead[i] = 0
|
|
157
|
-
}
|
|
150
|
+
for i, v := range &s.hashHead {
|
|
151
|
+
s.hashHead[i] = max(v-delta, 0)
|
|
158
152
|
}
|
|
159
153
|
}
|
|
160
154
|
}
|
|
161
155
|
n := copy(d.window[d.windowEnd:], b)
|
|
162
|
-
d.windowEnd += n
|
|
156
|
+
d.windowEnd += int32(n)
|
|
163
157
|
return n
|
|
164
158
|
}
|
|
165
159
|
|
|
166
|
-
|
|
167
|
-
|
|
160
|
+
// writeBlock will write tokens to output.
|
|
161
|
+
// The provided index is where the block starts in d.window.
|
|
162
|
+
func (d *compressor) writeBlock(tok *tokens, index int32, eof bool) error {
|
|
163
|
+
if index > 0 || eof {
|
|
168
164
|
var window []byte
|
|
169
165
|
if d.blockStart <= index {
|
|
170
166
|
window = d.window[d.blockStart:index]
|
|
171
167
|
}
|
|
172
168
|
d.blockStart = index
|
|
173
|
-
d.w.
|
|
169
|
+
d.w.writeBlockDynamic(tok, eof, window, d.sync)
|
|
170
|
+
return d.w.err
|
|
171
|
+
}
|
|
172
|
+
return nil
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// writeBlockSkip writes the current block and uses the number of tokens
|
|
176
|
+
// to determine if the block should be stored when there are no matches, or
|
|
177
|
+
// only Huffman encoded.
|
|
178
|
+
func (d *compressor) writeBlockSkip(tok *tokens, index int32, eof bool) error {
|
|
179
|
+
if index > 0 || eof {
|
|
180
|
+
if d.blockStart <= index {
|
|
181
|
+
window := d.window[d.blockStart:index]
|
|
182
|
+
// If we removed less than a 64th of all literals
|
|
183
|
+
// we huffman compress the block.
|
|
184
|
+
if int(tok.n) > len(window)-(len(window)>>6) {
|
|
185
|
+
d.w.writeBlockHuff(eof, window, d.sync)
|
|
186
|
+
} else {
|
|
187
|
+
// Write a dynamic huffman block.
|
|
188
|
+
d.w.writeBlockDynamic(tok, eof, window, d.sync)
|
|
189
|
+
}
|
|
190
|
+
} else {
|
|
191
|
+
d.w.writeBlock(tok, eof, nil)
|
|
192
|
+
}
|
|
193
|
+
d.blockStart = index
|
|
174
194
|
return d.w.err
|
|
175
195
|
}
|
|
176
196
|
return nil
|
|
@@ -179,87 +199,99 @@ func (d *compressor) writeBlock(tokens []token, index int) error {
|
|
|
179
199
|
// fillWindow will fill the current window with the supplied
|
|
180
200
|
// dictionary and calculate all hashes.
|
|
181
201
|
// This is much faster than doing a full encode.
|
|
182
|
-
// Should only be used after a reset.
|
|
202
|
+
// Should only be used after a start/reset.
|
|
183
203
|
func (d *compressor) fillWindow(b []byte) {
|
|
184
|
-
// Do not fill window if we are in store-only mode.
|
|
185
|
-
if d.
|
|
204
|
+
// Do not fill window if we are in store-only or huffman mode.
|
|
205
|
+
if d.level <= 0 {
|
|
186
206
|
return
|
|
187
207
|
}
|
|
188
|
-
if d.
|
|
189
|
-
|
|
208
|
+
if d.fast != nil {
|
|
209
|
+
// encode the last data, but discard the result
|
|
210
|
+
if len(b) > maxMatchOffset {
|
|
211
|
+
b = b[len(b)-maxMatchOffset:]
|
|
212
|
+
}
|
|
213
|
+
d.fast.encode(&d.tokens, b)
|
|
214
|
+
d.tokens.Reset()
|
|
215
|
+
return
|
|
190
216
|
}
|
|
191
|
-
|
|
217
|
+
s := d.state
|
|
192
218
|
// If we are given too much, cut it.
|
|
193
219
|
if len(b) > windowSize {
|
|
194
220
|
b = b[len(b)-windowSize:]
|
|
195
221
|
}
|
|
196
222
|
// Add all to window.
|
|
197
|
-
n := copy(d.window, b)
|
|
223
|
+
n := int32(copy(d.window[d.windowEnd:], b))
|
|
198
224
|
|
|
199
225
|
// Calculate 256 hashes at the time (more L1 cache hits)
|
|
200
226
|
loops := (n + 256 - minMatchLength) / 256
|
|
201
|
-
for j :=
|
|
202
|
-
|
|
203
|
-
end :=
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
toCheck := d.window[index:end]
|
|
208
|
-
dstSize := len(toCheck) - minMatchLength + 1
|
|
227
|
+
for j := range loops {
|
|
228
|
+
startindex := j * 256
|
|
229
|
+
end := min(startindex+256+minMatchLength-1, n)
|
|
230
|
+
tocheck := d.window[startindex:end]
|
|
231
|
+
dstSize := len(tocheck) - minMatchLength + 1
|
|
209
232
|
|
|
210
233
|
if dstSize <= 0 {
|
|
211
234
|
continue
|
|
212
235
|
}
|
|
213
236
|
|
|
214
|
-
dst :=
|
|
215
|
-
|
|
237
|
+
dst := s.hashMatch[:dstSize]
|
|
238
|
+
bulkHash4(tocheck, dst)
|
|
239
|
+
var newH uint32
|
|
216
240
|
for i, val := range dst {
|
|
217
|
-
di := i +
|
|
218
|
-
|
|
241
|
+
di := int32(i) + startindex
|
|
242
|
+
newH = val & hashMask
|
|
219
243
|
// Get previous value with the same hash.
|
|
220
244
|
// Our chain should point to the previous value.
|
|
221
|
-
|
|
245
|
+
s.hashPrev[di&windowMask] = s.hashHead[newH]
|
|
222
246
|
// Set the head of the hash chain to us.
|
|
223
|
-
|
|
247
|
+
s.hashHead[newH] = di + s.hashOffset
|
|
224
248
|
}
|
|
225
249
|
}
|
|
226
250
|
// Update window information.
|
|
227
|
-
d.windowEnd
|
|
228
|
-
|
|
251
|
+
d.windowEnd += n
|
|
252
|
+
s.index = n
|
|
253
|
+
d.blockStart = d.windowEnd
|
|
229
254
|
}
|
|
230
255
|
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
func (d *compressor) findMatch(pos
|
|
234
|
-
minMatchLook := maxMatchLength
|
|
235
|
-
if lookahead < minMatchLook {
|
|
236
|
-
minMatchLook = lookahead
|
|
237
|
-
}
|
|
256
|
+
// findMatch finds the longest match starting at pos in the hash chain starting
|
|
257
|
+
// at prevHead. It searches up to d.chain entries in the chain.
|
|
258
|
+
func (d *compressor) findMatch(pos int32, prevHead int32, lookahead int32) (length, offset int32, ok bool) {
|
|
259
|
+
minMatchLook := min(lookahead, maxMatchLength)
|
|
238
260
|
|
|
239
261
|
win := d.window[0 : pos+minMatchLook]
|
|
240
262
|
|
|
241
263
|
// We quit when we get a match that's at least nice long
|
|
242
|
-
nice := len(win)
|
|
243
|
-
if d.nice < nice {
|
|
244
|
-
nice = d.nice
|
|
245
|
-
}
|
|
264
|
+
nice := min(d.nice, int32(len(win))-pos)
|
|
246
265
|
|
|
247
266
|
// If we've got a match that's good enough, only look in 1/4 the chain.
|
|
248
267
|
tries := d.chain
|
|
249
|
-
length =
|
|
250
|
-
if length >= d.good {
|
|
251
|
-
tries >>= 2
|
|
252
|
-
}
|
|
268
|
+
length = minMatchLength - 1
|
|
253
269
|
|
|
254
270
|
wEnd := win[pos+length]
|
|
255
271
|
wPos := win[pos:]
|
|
256
|
-
minIndex := pos
|
|
272
|
+
minIndex := max(pos-windowSize, 0)
|
|
273
|
+
offset = 0
|
|
274
|
+
|
|
275
|
+
// Minimum gain to accept a match.
|
|
276
|
+
cGain := 4
|
|
277
|
+
|
|
278
|
+
// Some like it higher (CSV), some like it lower (JSON)
|
|
279
|
+
const baseCost = 3
|
|
280
|
+
// Base is 4 bytes at with an additional cost.
|
|
281
|
+
// Matches must be better than this.
|
|
257
282
|
|
|
258
283
|
for i := prevHead; tries > 0; tries-- {
|
|
259
284
|
if wEnd == win[i+length] {
|
|
260
|
-
n := matchLen(win[i:], wPos
|
|
261
|
-
|
|
262
|
-
|
|
285
|
+
n := int32(matchLen(win[i:i+minMatchLook], wPos))
|
|
286
|
+
if n > length {
|
|
287
|
+
if d.chain >= 100 {
|
|
288
|
+
// Calculate gain. Estimates the gains of the new match compared to emitting as literals.
|
|
289
|
+
newGain := d.h.bitLengthRaw(wPos[:n]) - int(offsetExtraBits[offsetCode(uint32(pos-i))]) - baseCost - int(lengthExtraBits[lengthCodes[(n-3)&255]])
|
|
290
|
+
if newGain <= cGain {
|
|
291
|
+
goto next
|
|
292
|
+
}
|
|
293
|
+
cGain = newGain
|
|
294
|
+
}
|
|
263
295
|
length = n
|
|
264
296
|
offset = pos - i
|
|
265
297
|
ok = true
|
|
@@ -270,18 +302,20 @@ func (d *compressor) findMatch(pos int, prevHead int, prevLength int, lookahead
|
|
|
270
302
|
wEnd = win[pos+n]
|
|
271
303
|
}
|
|
272
304
|
}
|
|
273
|
-
|
|
305
|
+
next:
|
|
306
|
+
if i <= minIndex {
|
|
274
307
|
// hashPrev[i & windowMask] has already been overwritten, so stop now.
|
|
275
308
|
break
|
|
276
309
|
}
|
|
277
|
-
i =
|
|
278
|
-
if i < minIndex
|
|
310
|
+
i = d.state.hashPrev[i&windowMask] - d.state.hashOffset
|
|
311
|
+
if i < minIndex {
|
|
279
312
|
break
|
|
280
313
|
}
|
|
281
314
|
}
|
|
282
315
|
return
|
|
283
316
|
}
|
|
284
317
|
|
|
318
|
+
// writeStoredBlock writes an uncompressed block to the stream.
|
|
285
319
|
func (d *compressor) writeStoredBlock(buf []byte) error {
|
|
286
320
|
if d.w.writeStoredHeader(len(buf), false); d.w.err != nil {
|
|
287
321
|
return d.w.err
|
|
@@ -290,235 +324,289 @@ func (d *compressor) writeStoredBlock(buf []byte) error {
|
|
|
290
324
|
return d.w.err
|
|
291
325
|
}
|
|
292
326
|
|
|
293
|
-
const hashmul = 0x1e35a7bd
|
|
294
|
-
|
|
295
327
|
// hash4 returns a hash representation of the first 4 bytes
|
|
296
328
|
// of the supplied slice.
|
|
297
329
|
// The caller must ensure that len(b) >= 4.
|
|
298
330
|
func hash4(b []byte) uint32 {
|
|
299
|
-
return ((
|
|
331
|
+
return hash4u(loadLE32(b, 0), hashBits)
|
|
300
332
|
}
|
|
301
333
|
|
|
302
|
-
//
|
|
303
|
-
//
|
|
334
|
+
// hash4 returns the hash of u to fit in a hash table with h bits.
|
|
335
|
+
// Preferably h should be a constant and should always be <32.
|
|
336
|
+
func hash4u(u uint32, h uint8) uint32 {
|
|
337
|
+
return (u * prime4bytes) >> (32 - h)
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// bulkHash4 sets dst[i] = hash4(b[i:i+4]) for all i <= len(b)-4.
|
|
304
341
|
func bulkHash4(b []byte, dst []uint32) {
|
|
305
|
-
if len(b) <
|
|
342
|
+
if len(b) < 4 {
|
|
306
343
|
return
|
|
307
344
|
}
|
|
308
|
-
hb :=
|
|
309
|
-
|
|
310
|
-
|
|
345
|
+
hb := loadLE32(b, 0)
|
|
346
|
+
|
|
347
|
+
dst[0] = hash4u(hb, hashBits)
|
|
348
|
+
end := len(b) - 4 + 1
|
|
311
349
|
for i := 1; i < end; i++ {
|
|
312
|
-
hb = (hb
|
|
313
|
-
dst[i] = (hb
|
|
350
|
+
hb = (hb >> 8) | uint32(b[i+3])<<24
|
|
351
|
+
dst[i] = hash4u(hb, hashBits)
|
|
314
352
|
}
|
|
315
353
|
}
|
|
316
354
|
|
|
317
|
-
//
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
if b[i] != av {
|
|
325
|
-
return i
|
|
326
|
-
}
|
|
355
|
+
// initDeflate initializes d for levels 7-9.
|
|
356
|
+
func (d *compressor) initDeflate() {
|
|
357
|
+
d.window = make([]byte, 2*windowSize)
|
|
358
|
+
d.byteAvailable = false
|
|
359
|
+
d.err = nil
|
|
360
|
+
if d.state == nil {
|
|
361
|
+
return
|
|
327
362
|
}
|
|
328
|
-
|
|
363
|
+
s := d.state
|
|
364
|
+
s.index = 0
|
|
365
|
+
s.hashOffset = 1
|
|
366
|
+
s.length = minMatchLength - 1
|
|
367
|
+
s.offset = 0
|
|
368
|
+
s.chainHead = -1
|
|
329
369
|
}
|
|
330
370
|
|
|
331
|
-
//
|
|
332
|
-
//
|
|
333
|
-
//
|
|
334
|
-
func (d *compressor)
|
|
335
|
-
// We
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
371
|
+
// tryBetterMatchAtEnd checks whether a better match exists at the end of the
|
|
372
|
+
// previous match and, if so, emits the skipped literals and adjusts the match.
|
|
373
|
+
// Returns the (possibly updated) prevLength and prevOffset.
|
|
374
|
+
func (d *compressor) tryBetterMatchAtEnd(prevLength, prevOffset, lookahead int32) (newLen, newOff int32) {
|
|
375
|
+
// We start checking at checkOff from the current match position.
|
|
376
|
+
// This allows up to two additional literals, but that could be
|
|
377
|
+
// compensated by a higher quality match.
|
|
378
|
+
// If the match looks better, we extend backwards.
|
|
379
|
+
const checkOff = 2
|
|
380
|
+
s := d.state
|
|
340
381
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
default:
|
|
349
|
-
d.w.writeBlockHuff(false, d.window[:d.windowEnd])
|
|
350
|
-
d.err = d.w.err
|
|
351
|
-
}
|
|
352
|
-
d.windowEnd = 0
|
|
353
|
-
d.bestSpeed.reset()
|
|
354
|
-
return
|
|
355
|
-
}
|
|
382
|
+
if prevLength >= maxMatchLength-checkOff {
|
|
383
|
+
return prevLength, prevOffset
|
|
384
|
+
}
|
|
385
|
+
prevIndex := s.index - 1
|
|
386
|
+
if prevIndex+prevLength >= s.maxInsertIndex {
|
|
387
|
+
return prevLength, prevOffset
|
|
388
|
+
}
|
|
356
389
|
|
|
390
|
+
end := min(lookahead, maxMatchLength+checkOff) + prevIndex
|
|
391
|
+
minIndex := max(s.index-windowSize, 0)
|
|
392
|
+
|
|
393
|
+
h := hash4(d.window[prevIndex+prevLength:])
|
|
394
|
+
ch2 := s.hashHead[h] - s.hashOffset - prevLength
|
|
395
|
+
if prevIndex-ch2 == prevOffset || ch2 <= minIndex+checkOff {
|
|
396
|
+
return prevLength, prevOffset
|
|
357
397
|
}
|
|
358
|
-
// Encode the block.
|
|
359
|
-
d.tokens = d.bestSpeed.encode(d.tokens[:0], d.window[:d.windowEnd])
|
|
360
398
|
|
|
361
|
-
|
|
362
|
-
if
|
|
363
|
-
|
|
364
|
-
} else {
|
|
365
|
-
d.w.writeBlockDynamic(d.tokens, false, d.window[:d.windowEnd])
|
|
399
|
+
length := int32(matchLen(d.window[prevIndex+checkOff:end], d.window[ch2+checkOff:]))
|
|
400
|
+
if length <= prevLength {
|
|
401
|
+
return prevLength, prevOffset
|
|
366
402
|
}
|
|
367
|
-
|
|
368
|
-
|
|
403
|
+
|
|
404
|
+
prevLength = length
|
|
405
|
+
prevOffset = prevIndex - ch2
|
|
406
|
+
|
|
407
|
+
for i := int32(checkOff - 1); i >= 0; i-- {
|
|
408
|
+
if prevLength >= maxMatchLength || d.window[prevIndex+i] != d.window[ch2+i] {
|
|
409
|
+
for j := range i + 1 {
|
|
410
|
+
d.tokens.AddLiteral(d.window[prevIndex+j])
|
|
411
|
+
if d.tokens.n == maxFlateBlockTokens {
|
|
412
|
+
if d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {
|
|
413
|
+
return prevLength, prevOffset
|
|
414
|
+
}
|
|
415
|
+
d.tokens.Reset()
|
|
416
|
+
}
|
|
417
|
+
s.index++
|
|
418
|
+
if s.index < s.maxInsertIndex {
|
|
419
|
+
h := hash4(d.window[s.index:])
|
|
420
|
+
ch := s.hashHead[h]
|
|
421
|
+
s.chainHead = ch
|
|
422
|
+
s.hashPrev[s.index&windowMask] = ch
|
|
423
|
+
s.hashHead[h] = s.index + s.hashOffset
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
break
|
|
427
|
+
}
|
|
428
|
+
prevLength++
|
|
429
|
+
}
|
|
430
|
+
return prevLength, prevOffset
|
|
369
431
|
}
|
|
370
432
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
d.
|
|
375
|
-
|
|
376
|
-
|
|
433
|
+
// skipLiterals emits extra literal bytes during long runs of incompressible data,
|
|
434
|
+
// skipping ahead to avoid futile match searches. Returns false on write error.
|
|
435
|
+
func (d *compressor) skipLiterals() bool {
|
|
436
|
+
s := d.state
|
|
437
|
+
n := int32(s.literalCounter) - d.chain
|
|
438
|
+
if n <= 0 {
|
|
439
|
+
return true
|
|
440
|
+
}
|
|
441
|
+
n = 1 + n>>6
|
|
442
|
+
for range n {
|
|
443
|
+
if s.index >= d.windowEnd-1 {
|
|
444
|
+
break
|
|
445
|
+
}
|
|
446
|
+
d.tokens.AddLiteral(d.window[s.index-1])
|
|
447
|
+
if d.tokens.n == maxFlateBlockTokens {
|
|
448
|
+
if d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {
|
|
449
|
+
return false
|
|
450
|
+
}
|
|
451
|
+
d.tokens.Reset()
|
|
452
|
+
}
|
|
453
|
+
if s.index < s.maxInsertIndex {
|
|
454
|
+
h := hash4(d.window[s.index:])
|
|
455
|
+
ch := s.hashHead[h]
|
|
456
|
+
s.chainHead = ch
|
|
457
|
+
s.hashPrev[s.index&windowMask] = ch
|
|
458
|
+
s.hashHead[h] = s.index + s.hashOffset
|
|
459
|
+
}
|
|
460
|
+
s.index++
|
|
461
|
+
}
|
|
462
|
+
d.tokens.AddLiteral(d.window[s.index-1])
|
|
377
463
|
d.byteAvailable = false
|
|
378
|
-
d.
|
|
379
|
-
|
|
380
|
-
|
|
464
|
+
if d.tokens.n == maxFlateBlockTokens {
|
|
465
|
+
if d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {
|
|
466
|
+
return false
|
|
467
|
+
}
|
|
468
|
+
d.tokens.Reset()
|
|
469
|
+
}
|
|
470
|
+
return true
|
|
381
471
|
}
|
|
382
472
|
|
|
383
|
-
|
|
384
|
-
|
|
473
|
+
// deflateLazy encodes the current window using lazy matching.
|
|
474
|
+
// Lazy matching defers emitting a match to see if the next position yields a better one.
|
|
475
|
+
// Unique to levels 7-9 is that more than 2 matches are potentially checked
|
|
476
|
+
// until a good/nice one is found.
|
|
477
|
+
func (d *compressor) deflateLazy() {
|
|
478
|
+
s := d.state
|
|
479
|
+
|
|
480
|
+
if d.windowEnd-s.index < minMatchLength+maxMatchLength && !d.sync {
|
|
385
481
|
return
|
|
386
482
|
}
|
|
483
|
+
if d.windowEnd != s.index && d.chain > 100 {
|
|
484
|
+
// Get literal huffman coder.
|
|
485
|
+
// This is used to estimate the cost of emitting a literal.
|
|
486
|
+
if d.h == nil {
|
|
487
|
+
d.h = newHuffmanEncoder(maxFlateBlockTokens)
|
|
488
|
+
}
|
|
489
|
+
var tmp [256]uint16
|
|
490
|
+
toIndex := d.window[s.index:d.windowEnd]
|
|
491
|
+
toIndex = toIndex[:min(len(toIndex), maxFlateBlockTokens)]
|
|
492
|
+
for _, v := range toIndex {
|
|
493
|
+
tmp[v]++
|
|
494
|
+
}
|
|
495
|
+
d.h.generate(tmp[:], 15)
|
|
496
|
+
}
|
|
387
497
|
|
|
388
|
-
|
|
498
|
+
s.maxInsertIndex = d.windowEnd - (minMatchLength - 1)
|
|
389
499
|
|
|
390
|
-
Loop:
|
|
391
500
|
for {
|
|
392
|
-
|
|
393
|
-
panic("index > windowEnd")
|
|
394
|
-
}
|
|
395
|
-
lookahead := d.windowEnd - d.index
|
|
501
|
+
lookahead := d.windowEnd - s.index
|
|
396
502
|
if lookahead < minMatchLength+maxMatchLength {
|
|
397
503
|
if !d.sync {
|
|
398
|
-
|
|
399
|
-
}
|
|
400
|
-
if d.index > d.windowEnd {
|
|
401
|
-
panic("index > windowEnd")
|
|
504
|
+
return
|
|
402
505
|
}
|
|
403
506
|
if lookahead == 0 {
|
|
404
507
|
// Flush current output block if any.
|
|
405
508
|
if d.byteAvailable {
|
|
406
509
|
// There is still one pending token that needs to be flushed
|
|
407
|
-
d.tokens
|
|
510
|
+
d.tokens.AddLiteral(d.window[s.index-1])
|
|
408
511
|
d.byteAvailable = false
|
|
409
512
|
}
|
|
410
|
-
if
|
|
411
|
-
if d.err = d.writeBlock(d.tokens,
|
|
513
|
+
if d.tokens.n > 0 {
|
|
514
|
+
if d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {
|
|
412
515
|
return
|
|
413
516
|
}
|
|
414
|
-
d.tokens
|
|
517
|
+
d.tokens.Reset()
|
|
415
518
|
}
|
|
416
|
-
|
|
519
|
+
return
|
|
417
520
|
}
|
|
418
521
|
}
|
|
419
|
-
if
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
*hh = uint32(d.index + d.hashOffset)
|
|
522
|
+
if s.index < s.maxInsertIndex {
|
|
523
|
+
h := hash4(d.window[s.index:])
|
|
524
|
+
ch := s.hashHead[h]
|
|
525
|
+
s.chainHead = ch
|
|
526
|
+
s.hashPrev[s.index&windowMask] = ch
|
|
527
|
+
s.hashHead[h] = s.index + s.hashOffset
|
|
426
528
|
}
|
|
427
|
-
prevLength :=
|
|
428
|
-
prevOffset :=
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
minIndex :=
|
|
432
|
-
|
|
433
|
-
|
|
529
|
+
prevLength := s.length
|
|
530
|
+
prevOffset := s.offset
|
|
531
|
+
s.length = minMatchLength - 1
|
|
532
|
+
s.offset = 0
|
|
533
|
+
minIndex := max(s.index-windowSize, 0)
|
|
534
|
+
|
|
535
|
+
if s.chainHead-s.hashOffset >= minIndex && lookahead > prevLength && prevLength < d.lazy {
|
|
536
|
+
if newLength, newOffset, ok := d.findMatch(s.index, s.chainHead-s.hashOffset, lookahead); ok {
|
|
537
|
+
s.length = newLength
|
|
538
|
+
s.offset = newOffset
|
|
539
|
+
}
|
|
434
540
|
}
|
|
435
541
|
|
|
436
|
-
if
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
d.length = newLength
|
|
441
|
-
d.offset = newOffset
|
|
542
|
+
if prevLength >= minMatchLength && s.length <= prevLength {
|
|
543
|
+
prevLength, prevOffset = d.tryBetterMatchAtEnd(prevLength, prevOffset, lookahead)
|
|
544
|
+
if d.err != nil {
|
|
545
|
+
return
|
|
442
546
|
}
|
|
443
|
-
|
|
444
|
-
if d.fastSkipHashing != skipNever && d.length >= minMatchLength ||
|
|
445
|
-
d.fastSkipHashing == skipNever && prevLength >= minMatchLength && d.length <= prevLength {
|
|
547
|
+
|
|
446
548
|
// There was a match at the previous step, and the current match is
|
|
447
549
|
// not better. Output the previous match.
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
} else {
|
|
451
|
-
d.tokens = append(d.tokens, matchToken(uint32(prevLength-baseMatchLength), uint32(prevOffset-baseMatchOffset)))
|
|
452
|
-
}
|
|
550
|
+
d.tokens.AddMatch(uint32(prevLength-3), uint32(prevOffset-minOffsetSize))
|
|
551
|
+
|
|
453
552
|
// Insert in the hash table all strings up to the end of the match.
|
|
454
553
|
// index and index-1 are already inserted. If there is not enough
|
|
455
554
|
// lookahead, the last two strings are not inserted into the hash
|
|
456
555
|
// table.
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
// Set the head of the hash chain to us.
|
|
473
|
-
*hh = uint32(index + d.hashOffset)
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
d.index = index
|
|
477
|
-
|
|
478
|
-
if d.fastSkipHashing == skipNever {
|
|
479
|
-
d.byteAvailable = false
|
|
480
|
-
d.length = minMatchLength - 1
|
|
556
|
+
newIndex := s.index + prevLength - 1
|
|
557
|
+
end := min(newIndex, s.maxInsertIndex)
|
|
558
|
+
end += minMatchLength - 1
|
|
559
|
+
startindex := min(s.index+1, s.maxInsertIndex)
|
|
560
|
+
tocheck := d.window[startindex:end]
|
|
561
|
+
dstSize := len(tocheck) - minMatchLength + 1
|
|
562
|
+
if dstSize > 0 {
|
|
563
|
+
dst := s.hashMatch[:dstSize]
|
|
564
|
+
bulkHash4(tocheck, dst)
|
|
565
|
+
var newH uint32
|
|
566
|
+
for i, val := range dst {
|
|
567
|
+
di := int32(i) + startindex
|
|
568
|
+
newH = val & hashMask
|
|
569
|
+
s.hashPrev[di&windowMask] = s.hashHead[newH]
|
|
570
|
+
s.hashHead[newH] = di + s.hashOffset
|
|
481
571
|
}
|
|
482
|
-
} else {
|
|
483
|
-
// For matches this long, we don't bother inserting each individual
|
|
484
|
-
// item into the table.
|
|
485
|
-
d.index += d.length
|
|
486
572
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
573
|
+
|
|
574
|
+
s.index = newIndex
|
|
575
|
+
d.byteAvailable = false
|
|
576
|
+
s.length = minMatchLength - 1
|
|
577
|
+
if d.tokens.n == maxFlateBlockTokens {
|
|
578
|
+
if d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {
|
|
490
579
|
return
|
|
491
580
|
}
|
|
492
|
-
d.tokens
|
|
581
|
+
d.tokens.Reset()
|
|
493
582
|
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
583
|
+
s.literalCounter = 0
|
|
584
|
+
continue
|
|
585
|
+
}
|
|
586
|
+
if s.length >= minMatchLength {
|
|
587
|
+
s.literalCounter = 0
|
|
588
|
+
}
|
|
589
|
+
if d.byteAvailable {
|
|
590
|
+
s.literalCounter++
|
|
591
|
+
d.tokens.AddLiteral(d.window[s.index-1])
|
|
592
|
+
if d.tokens.n == maxFlateBlockTokens {
|
|
593
|
+
if d.err = d.writeBlock(&d.tokens, s.index, false); d.err != nil {
|
|
594
|
+
return
|
|
506
595
|
}
|
|
596
|
+
d.tokens.Reset()
|
|
507
597
|
}
|
|
508
|
-
|
|
509
|
-
if d.
|
|
510
|
-
|
|
598
|
+
s.index++
|
|
599
|
+
if !d.skipLiterals() {
|
|
600
|
+
return
|
|
511
601
|
}
|
|
602
|
+
} else {
|
|
603
|
+
s.index++
|
|
604
|
+
d.byteAvailable = true
|
|
512
605
|
}
|
|
513
606
|
}
|
|
514
607
|
}
|
|
515
608
|
|
|
516
|
-
|
|
517
|
-
n := copy(d.window[d.windowEnd:], b)
|
|
518
|
-
d.windowEnd += n
|
|
519
|
-
return n
|
|
520
|
-
}
|
|
521
|
-
|
|
609
|
+
// store will store the current window if it has filled or if we are in sync.
|
|
522
610
|
func (d *compressor) store() {
|
|
523
611
|
if d.windowEnd > 0 && (d.windowEnd == maxStoreBlockSize || d.sync) {
|
|
524
612
|
d.err = d.writeStoredBlock(d.window[:d.windowEnd])
|
|
@@ -526,33 +614,91 @@ func (d *compressor) store() {
|
|
|
526
614
|
}
|
|
527
615
|
}
|
|
528
616
|
|
|
529
|
-
//
|
|
530
|
-
//
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
617
|
+
// fillBlock appends b to d.window, returning the number of bytes copied.
|
|
618
|
+
// If n < len(b), the window is filled.
|
|
619
|
+
func (d *compressor) fillBlock(b []byte) int {
|
|
620
|
+
n := copy(d.window[d.windowEnd:], b)
|
|
621
|
+
d.windowEnd += int32(n)
|
|
622
|
+
return n
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
// deflateHuff compresses and stores the current window
|
|
626
|
+
// (if it has filled or if we are in sync or flush).
|
|
627
|
+
// It uses Huffman-only encoding.
|
|
628
|
+
func (d *compressor) deflateHuff() {
|
|
629
|
+
if int(d.windowEnd) < len(d.window) && !d.sync || d.windowEnd == 0 {
|
|
534
630
|
return
|
|
535
631
|
}
|
|
536
|
-
d.w.writeBlockHuff(false, d.window[:d.windowEnd])
|
|
632
|
+
d.w.writeBlockHuff(false, d.window[:d.windowEnd], d.sync)
|
|
537
633
|
d.err = d.w.err
|
|
538
634
|
d.windowEnd = 0
|
|
539
635
|
}
|
|
540
636
|
|
|
637
|
+
// deflateFast encodes the current window
|
|
638
|
+
// if it has filled or if we are doing sync/flush.
|
|
639
|
+
// It uses the level 1-6 fast encoding.
|
|
640
|
+
func (d *compressor) deflateFast() {
|
|
641
|
+
// We only compress if we have maxStoreBlockSize.
|
|
642
|
+
if int(d.windowEnd) < len(d.window) {
|
|
643
|
+
if !d.sync {
|
|
644
|
+
return
|
|
645
|
+
}
|
|
646
|
+
// Handle extremely small sizes.
|
|
647
|
+
if d.windowEnd < 128 {
|
|
648
|
+
if d.windowEnd == 0 {
|
|
649
|
+
return
|
|
650
|
+
}
|
|
651
|
+
if d.windowEnd <= 32 {
|
|
652
|
+
d.err = d.writeStoredBlock(d.window[:d.windowEnd])
|
|
653
|
+
} else {
|
|
654
|
+
d.w.writeBlockHuff(false, d.window[:d.windowEnd], true)
|
|
655
|
+
d.err = d.w.err
|
|
656
|
+
}
|
|
657
|
+
d.tokens.Reset()
|
|
658
|
+
d.windowEnd = 0
|
|
659
|
+
d.fast.reset()
|
|
660
|
+
return
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
d.fast.encode(&d.tokens, d.window[:d.windowEnd])
|
|
665
|
+
// If we made zero matches, store the block as is.
|
|
666
|
+
if d.tokens.n == 0 {
|
|
667
|
+
d.err = d.writeStoredBlock(d.window[:d.windowEnd])
|
|
668
|
+
// If we removed less than 1/16th, huffman compress the block.
|
|
669
|
+
} else if int32(d.tokens.n) > d.windowEnd-(d.windowEnd>>4) {
|
|
670
|
+
d.w.writeBlockHuff(false, d.window[:d.windowEnd], d.sync)
|
|
671
|
+
d.err = d.w.err
|
|
672
|
+
} else {
|
|
673
|
+
d.w.writeBlockDynamic(&d.tokens, false, d.window[:d.windowEnd], d.sync)
|
|
674
|
+
d.err = d.w.err
|
|
675
|
+
}
|
|
676
|
+
d.tokens.Reset()
|
|
677
|
+
d.windowEnd = 0
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
// write adds b to the compressor.
|
|
681
|
+
// It can only return a short length if an error occurs.
|
|
541
682
|
func (d *compressor) write(b []byte) (n int, err error) {
|
|
542
683
|
if d.err != nil {
|
|
543
684
|
return 0, d.err
|
|
544
685
|
}
|
|
545
686
|
n = len(b)
|
|
546
687
|
for len(b) > 0 {
|
|
547
|
-
d.
|
|
688
|
+
if int(d.windowEnd) == len(d.window) || d.sync {
|
|
689
|
+
d.step(d)
|
|
690
|
+
}
|
|
548
691
|
b = b[d.fill(d, b):]
|
|
549
692
|
if d.err != nil {
|
|
550
693
|
return 0, d.err
|
|
551
694
|
}
|
|
552
695
|
}
|
|
553
|
-
return n,
|
|
696
|
+
return n, d.err
|
|
554
697
|
}
|
|
555
698
|
|
|
699
|
+
// syncFlush will flush the compressor by writing
|
|
700
|
+
// any remaining window and writing a stored block
|
|
701
|
+
// to byte-align the output.
|
|
556
702
|
func (d *compressor) syncFlush() error {
|
|
557
703
|
if d.err != nil {
|
|
558
704
|
return d.err
|
|
@@ -568,64 +714,75 @@ func (d *compressor) syncFlush() error {
|
|
|
568
714
|
return d.err
|
|
569
715
|
}
|
|
570
716
|
|
|
717
|
+
// init a new encode with new writer and compression level.
|
|
571
718
|
func (d *compressor) init(w io.Writer, level int) (err error) {
|
|
572
719
|
d.w = newHuffmanBitWriter(w)
|
|
573
720
|
|
|
574
721
|
switch {
|
|
575
722
|
case level == NoCompression:
|
|
576
723
|
d.window = make([]byte, maxStoreBlockSize)
|
|
577
|
-
d.fill = (*compressor).
|
|
724
|
+
d.fill = (*compressor).fillBlock
|
|
578
725
|
d.step = (*compressor).store
|
|
579
726
|
case level == HuffmanOnly:
|
|
580
|
-
d.
|
|
581
|
-
d.
|
|
582
|
-
d.
|
|
583
|
-
|
|
584
|
-
d.compressionLevel = levels[level]
|
|
585
|
-
d.window = make([]byte, maxStoreBlockSize)
|
|
586
|
-
d.fill = (*compressor).fillStore
|
|
587
|
-
d.step = (*compressor).encSpeed
|
|
588
|
-
d.bestSpeed = newDeflateFast()
|
|
589
|
-
d.tokens = make([]token, maxStoreBlockSize)
|
|
727
|
+
d.w.logNewTablePenalty = 10
|
|
728
|
+
d.window = make([]byte, 32<<10)
|
|
729
|
+
d.fill = (*compressor).fillBlock
|
|
730
|
+
d.step = (*compressor).deflateHuff
|
|
590
731
|
case level == DefaultCompression:
|
|
591
732
|
level = 6
|
|
592
733
|
fallthrough
|
|
593
|
-
case
|
|
734
|
+
case 1 <= level && level <= 6:
|
|
735
|
+
d.w.logNewTablePenalty = 7
|
|
736
|
+
d.fast = newFastEnc(level)
|
|
737
|
+
d.window = make([]byte, maxStoreBlockSize)
|
|
738
|
+
d.fill = (*compressor).fillBlock
|
|
739
|
+
d.step = (*compressor).deflateFast
|
|
740
|
+
case 7 <= level && level <= 9:
|
|
741
|
+
d.w.logNewTablePenalty = 8
|
|
742
|
+
d.state = &advancedState{}
|
|
594
743
|
d.compressionLevel = levels[level]
|
|
595
744
|
d.initDeflate()
|
|
596
745
|
d.fill = (*compressor).fillDeflate
|
|
597
|
-
d.step = (*compressor).
|
|
746
|
+
d.step = (*compressor).deflateLazy
|
|
598
747
|
default:
|
|
599
748
|
return fmt.Errorf("flate: invalid compression level %d: want value in range [-2, 9]", level)
|
|
600
749
|
}
|
|
750
|
+
d.level = level
|
|
601
751
|
return nil
|
|
602
752
|
}
|
|
603
753
|
|
|
754
|
+
// reset resets the compressor with a new output writer.
|
|
604
755
|
func (d *compressor) reset(w io.Writer) {
|
|
605
756
|
d.w.reset(w)
|
|
606
757
|
d.sync = false
|
|
607
758
|
d.err = nil
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
d.
|
|
613
|
-
|
|
614
|
-
d.bestSpeed.reset()
|
|
615
|
-
default:
|
|
616
|
-
d.chainHead = -1
|
|
617
|
-
clear(d.hashHead[:])
|
|
618
|
-
clear(d.hashPrev[:])
|
|
619
|
-
d.hashOffset = 1
|
|
620
|
-
d.index, d.windowEnd = 0, 0
|
|
621
|
-
d.blockStart, d.byteAvailable = 0, false
|
|
622
|
-
d.tokens = d.tokens[:0]
|
|
623
|
-
d.length = minMatchLength - 1
|
|
624
|
-
d.offset = 0
|
|
625
|
-
d.maxInsertIndex = 0
|
|
759
|
+
d.windowEnd = 0
|
|
760
|
+
// We only need to reset a few things for fast encoders.
|
|
761
|
+
if d.fast != nil {
|
|
762
|
+
d.fast.reset()
|
|
763
|
+
d.tokens.Reset()
|
|
764
|
+
return
|
|
626
765
|
}
|
|
766
|
+
if d.compressionLevel.chain == 0 {
|
|
767
|
+
return
|
|
768
|
+
}
|
|
769
|
+
s := d.state
|
|
770
|
+
s.chainHead = -1
|
|
771
|
+
clear(s.hashHead[:])
|
|
772
|
+
clear(s.hashPrev[:])
|
|
773
|
+
s.hashOffset = 1
|
|
774
|
+
s.index = 0
|
|
775
|
+
d.blockStart, d.byteAvailable = 0, false
|
|
776
|
+
d.tokens.Reset()
|
|
777
|
+
s.length = minMatchLength - 1
|
|
778
|
+
s.offset = 0
|
|
779
|
+
s.literalCounter = 0
|
|
780
|
+
s.maxInsertIndex = 0
|
|
627
781
|
}
|
|
628
782
|
|
|
783
|
+
var errWriterClosed = errors.New("flate: closed writer")
|
|
784
|
+
|
|
785
|
+
// close flushes any uncompressed data and writes an EOF block.
|
|
629
786
|
func (d *compressor) close() error {
|
|
630
787
|
if d.err == errWriterClosed {
|
|
631
788
|
return nil
|
|
@@ -646,6 +803,7 @@ func (d *compressor) close() error {
|
|
|
646
803
|
return d.w.err
|
|
647
804
|
}
|
|
648
805
|
d.err = errWriterClosed
|
|
806
|
+
d.w.reset(nil)
|
|
649
807
|
return nil
|
|
650
808
|
}
|
|
651
809
|
|
|
@@ -661,6 +819,10 @@ func (d *compressor) close() error {
|
|
|
661
819
|
//
|
|
662
820
|
// If level is in the range [-2, 9] then the error returned will be nil.
|
|
663
821
|
// Otherwise the error returned will be non-nil.
|
|
822
|
+
//
|
|
823
|
+
// Note that the exact bytes written to w are not covered by the Go 1
|
|
824
|
+
// compatibility promise. Callers, including tests, should not depend on the
|
|
825
|
+
// exact written bytes.
|
|
664
826
|
func NewWriter(w io.Writer, level int) (*Writer, error) {
|
|
665
827
|
var dw Writer
|
|
666
828
|
if err := dw.d.init(w, level); err != nil {
|
|
@@ -675,27 +837,21 @@ func NewWriter(w io.Writer, level int) (*Writer, error) {
|
|
|
675
837
|
// any compressed output. The compressed data written to w
|
|
676
838
|
// can only be decompressed by a reader initialized with the
|
|
677
839
|
// same dictionary (see [NewReaderDict]).
|
|
840
|
+
//
|
|
841
|
+
// Note that the exact bytes written to w are not covered by the Go 1
|
|
842
|
+
// compatibility promise. Callers, including tests, should not depend on the
|
|
843
|
+
// exact written bytes.
|
|
678
844
|
func NewWriterDict(w io.Writer, level int, dict []byte) (*Writer, error) {
|
|
679
|
-
|
|
680
|
-
zw, err := NewWriter(dw, level)
|
|
845
|
+
zw, err := NewWriter(w, level)
|
|
681
846
|
if err != nil {
|
|
682
847
|
return nil, err
|
|
683
848
|
}
|
|
684
849
|
zw.d.fillWindow(dict)
|
|
685
|
-
|
|
686
|
-
|
|
850
|
+
// Clone dict so we can Reset without changing the provided slice.
|
|
851
|
+
zw.dict = slices.Clone(dict)
|
|
852
|
+
return zw, err
|
|
687
853
|
}
|
|
688
854
|
|
|
689
|
-
type dictWriter struct {
|
|
690
|
-
w io.Writer
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
func (w *dictWriter) Write(b []byte) (n int, err error) {
|
|
694
|
-
return w.w.Write(b)
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
var errWriterClosed = errors.New("flate: closed writer")
|
|
698
|
-
|
|
699
855
|
// A Writer takes data written to it and writes the compressed
|
|
700
856
|
// form of that data to an underlying writer (see [NewWriter]).
|
|
701
857
|
type Writer struct {
|
|
@@ -730,16 +886,9 @@ func (w *Writer) Close() error {
|
|
|
730
886
|
}
|
|
731
887
|
|
|
732
888
|
// Reset discards the writer's state and makes it equivalent to
|
|
733
|
-
// the result of
|
|
889
|
+
// the result of NewWriter or NewWriterDict called with dst
|
|
734
890
|
// and w's level and dictionary.
|
|
735
891
|
func (w *Writer) Reset(dst io.Writer) {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
dw.w = dst
|
|
739
|
-
w.d.reset(dw)
|
|
740
|
-
w.d.fillWindow(w.dict)
|
|
741
|
-
} else {
|
|
742
|
-
// w was created with NewWriter
|
|
743
|
-
w.d.reset(dst)
|
|
744
|
-
}
|
|
892
|
+
w.d.reset(dst)
|
|
893
|
+
w.d.fillWindow(w.dict)
|
|
745
894
|
}
|