@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
|
@@ -6,6 +6,8 @@ package flate
|
|
|
6
6
|
|
|
7
7
|
import (
|
|
8
8
|
"io"
|
|
9
|
+
"math"
|
|
10
|
+
"sync"
|
|
9
11
|
)
|
|
10
12
|
|
|
11
13
|
const (
|
|
@@ -22,52 +24,93 @@ const (
|
|
|
22
24
|
codegenCodeCount = 19
|
|
23
25
|
badCode = 255
|
|
24
26
|
|
|
27
|
+
// maxPredefinedTokens is the maximum number of tokens
|
|
28
|
+
// where we check if fixed size is smaller.
|
|
29
|
+
maxPredefinedTokens = 250
|
|
30
|
+
|
|
25
31
|
// bufferFlushSize indicates the buffer size
|
|
26
32
|
// after which bytes are flushed to the writer.
|
|
27
33
|
// Should preferably be a multiple of 6, since
|
|
28
34
|
// we accumulate 6 bytes between writes to the buffer.
|
|
29
|
-
bufferFlushSize =
|
|
30
|
-
|
|
31
|
-
// bufferSize is the actual output byte buffer size.
|
|
32
|
-
// It must have additional headroom for a flush
|
|
33
|
-
// which can contain up to 8 bytes.
|
|
34
|
-
bufferSize = bufferFlushSize + 8
|
|
35
|
+
bufferFlushSize = 246
|
|
35
36
|
)
|
|
36
37
|
|
|
37
|
-
//
|
|
38
|
-
|
|
38
|
+
// lengthExtraBitsMinCode is the minimum length code that emits extra bits.
|
|
39
|
+
const lengthExtraBitsMinCode = 8
|
|
40
|
+
|
|
41
|
+
// lengthExtraBits[i] is the number of extra bits needed by
|
|
42
|
+
// length code i + lengthCodesStart.
|
|
43
|
+
var lengthExtraBits = [32]uint8{
|
|
39
44
|
/* 257 */ 0, 0, 0,
|
|
40
45
|
/* 260 */ 0, 0, 0, 0, 0, 1, 1, 1, 1, 2,
|
|
41
46
|
/* 270 */ 2, 2, 2, 3, 3, 3, 3, 4, 4, 4,
|
|
42
47
|
/* 280 */ 4, 5, 5, 5, 5, 0,
|
|
43
48
|
}
|
|
44
49
|
|
|
45
|
-
//
|
|
46
|
-
var lengthBase = []
|
|
50
|
+
// lengthBase[i] is the length indicated by length code i + lengthCodesStart.
|
|
51
|
+
var lengthBase = [32]uint8{
|
|
47
52
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 10,
|
|
48
53
|
12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
|
|
49
54
|
64, 80, 96, 112, 128, 160, 192, 224, 255,
|
|
50
55
|
}
|
|
51
56
|
|
|
52
|
-
// offset code
|
|
53
|
-
|
|
57
|
+
// offsetExtraBitsMinCode is the minimum offset code that emits extra bits.
|
|
58
|
+
const offsetExtraBitsMinCode = 4
|
|
59
|
+
|
|
60
|
+
// offsetExtraBits[i] is the number of extra bits for offset code i.
|
|
61
|
+
var offsetExtraBits = [32]int8{
|
|
54
62
|
0, 0, 0, 0, 1, 1, 2, 2, 3, 3,
|
|
55
63
|
4, 4, 5, 5, 6, 6, 7, 7, 8, 8,
|
|
56
64
|
9, 9, 10, 10, 11, 11, 12, 12, 13, 13,
|
|
65
|
+
/* extended window */
|
|
66
|
+
14, 14,
|
|
57
67
|
}
|
|
58
68
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
// offsetCombined combines offset lookup of extra bits and offset code in a single table.
|
|
70
|
+
var offsetCombined = [32]uint32{
|
|
71
|
+
0x0, 0x0, 0x0, 0x0, 0x401, 0x601, 0x802, 0xc02,
|
|
72
|
+
0x1003, 0x1803, 0x2004, 0x3004, 0x4005, 0x6005,
|
|
73
|
+
0x8006, 0xc006, 0x10007, 0x18007, 0x20008, 0x30008,
|
|
74
|
+
0x40009, 0x60009, 0x8000a, 0xc000a, 0x10000b, 0x18000b,
|
|
75
|
+
0x20000c, 0x30000c, 0x40000d, 0x60000d, 0x0, 0x0}
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
Generated with:
|
|
79
|
+
|
|
80
|
+
func genOffsetCombined() {
|
|
81
|
+
var offsetBase = [32]uint32{
|
|
82
|
+
0x000000, 0x000001, 0x000002, 0x000003, 0x000004,
|
|
83
|
+
0x000006, 0x000008, 0x00000c, 0x000010, 0x000018,
|
|
84
|
+
0x000020, 0x000030, 0x000040, 0x000060, 0x000080,
|
|
85
|
+
0x0000c0, 0x000100, 0x000180, 0x000200, 0x000300,
|
|
86
|
+
0x000400, 0x000600, 0x000800, 0x000c00, 0x001000,
|
|
87
|
+
0x001800, 0x002000, 0x003000, 0x004000, 0x006000,
|
|
88
|
+
|
|
89
|
+
0x008000, 0x00c000,
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
for i := range offsetCombined[:] {
|
|
93
|
+
// Don't use extended window values...
|
|
94
|
+
if offsetExtraBits[i] == 0 || offsetBase[i] > 0x006000 {
|
|
95
|
+
continue
|
|
96
|
+
}
|
|
97
|
+
offsetCombined[i] = uint32(offsetExtraBits[i]) | (offsetBase[i] << 8)
|
|
98
|
+
}
|
|
99
|
+
fmt.Printf("offsetCombined = %#v\n", offsetCombined)
|
|
66
100
|
}
|
|
101
|
+
*/
|
|
67
102
|
|
|
68
|
-
//
|
|
103
|
+
// codegenOrder is the order in which codegen code sizes are written.
|
|
69
104
|
var codegenOrder = []uint32{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}
|
|
70
105
|
|
|
106
|
+
// huffmanBitWriter encodes tokens and values to a stream.
|
|
107
|
+
// The huffmanBitWriter supports reusing huffman tables and will combine
|
|
108
|
+
// blocks, if compression is less than creating a new table.
|
|
109
|
+
//
|
|
110
|
+
// An incoming block estimates the output size of a new table using a
|
|
111
|
+
// 'fresh' by calculating the optimal size and adding a penalty.
|
|
112
|
+
// A Huffman table is not optimal, which is why we add a penalty,
|
|
113
|
+
// and generating a new table is slower for both compression and decompression.
|
|
71
114
|
type huffmanBitWriter struct {
|
|
72
115
|
// writer is the underlying writer.
|
|
73
116
|
// Do not use it directly; use the write method, which ensures
|
|
@@ -75,44 +118,100 @@ type huffmanBitWriter struct {
|
|
|
75
118
|
writer io.Writer
|
|
76
119
|
|
|
77
120
|
// Data waiting to be written is bytes[0:nbytes]
|
|
78
|
-
// and then the low nbits of bits.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
offsetFreq []int32
|
|
87
|
-
codegen []uint8
|
|
121
|
+
// and then the low nbits of bits.
|
|
122
|
+
bits uint64
|
|
123
|
+
nbits uint8
|
|
124
|
+
nbytes uint8
|
|
125
|
+
|
|
126
|
+
// If wroteHuffman is set, a table for outputting only literals
|
|
127
|
+
// has been generated and offsets are invalid.
|
|
128
|
+
wroteHuffman bool
|
|
88
129
|
literalEncoding *huffmanEncoder
|
|
130
|
+
tmpLitEncoding *huffmanEncoder
|
|
89
131
|
offsetEncoding *huffmanEncoder
|
|
90
132
|
codegenEncoding *huffmanEncoder
|
|
91
133
|
err error
|
|
134
|
+
|
|
135
|
+
// If prevHeader is non-zero the Huffman table can be reused.
|
|
136
|
+
// It also indicates that an EOB has not yet been emitted, so if a new table
|
|
137
|
+
// is generated, an EOB with the previous table must be written.
|
|
138
|
+
prevHeader int
|
|
139
|
+
|
|
140
|
+
// logNewTablePenalty is a log2 penalty reduction for creating new tables.
|
|
141
|
+
// The initial penalty is 100%.
|
|
142
|
+
// Adding 1 will cut the penalty in half.
|
|
143
|
+
logNewTablePenalty uint
|
|
144
|
+
bytes [256 + 8]byte
|
|
145
|
+
literalFreq [lengthCodesStart + 32]uint16
|
|
146
|
+
offsetFreq [32]uint16
|
|
147
|
+
codegenFreq [codegenCodeCount]uint16
|
|
148
|
+
|
|
149
|
+
// codegen must have an extra space for the final symbol.
|
|
150
|
+
codegen [literalCount + offsetCodeCount + 1]uint8
|
|
92
151
|
}
|
|
93
152
|
|
|
153
|
+
// newHuffmanBitWriter creates a new huffmanBitWriter that will write to w.
|
|
94
154
|
func newHuffmanBitWriter(w io.Writer) *huffmanBitWriter {
|
|
95
155
|
return &huffmanBitWriter{
|
|
96
156
|
writer: w,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
codegen: make([]uint8, maxNumLit+offsetCodeCount+1),
|
|
100
|
-
literalEncoding: newHuffmanEncoder(maxNumLit),
|
|
157
|
+
literalEncoding: newHuffmanEncoder(literalCount),
|
|
158
|
+
tmpLitEncoding: newHuffmanEncoder(literalCount),
|
|
101
159
|
codegenEncoding: newHuffmanEncoder(codegenCodeCount),
|
|
102
160
|
offsetEncoding: newHuffmanEncoder(offsetCodeCount),
|
|
103
161
|
}
|
|
104
162
|
}
|
|
105
163
|
|
|
164
|
+
// reset the huffmanBitWriter state and replace the output.
|
|
106
165
|
func (w *huffmanBitWriter) reset(writer io.Writer) {
|
|
107
166
|
w.writer = writer
|
|
108
167
|
w.bits, w.nbits, w.nbytes, w.err = 0, 0, 0, nil
|
|
168
|
+
w.prevHeader = 0
|
|
169
|
+
w.wroteHuffman = false
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// canReuse checks if the current generated tables can be
|
|
173
|
+
// reused for the provided tokens.
|
|
174
|
+
func (w *huffmanBitWriter) canReuse(t *tokens) (ok bool) {
|
|
175
|
+
a := t.offHist[:offsetCodeCount]
|
|
176
|
+
b := w.offsetEncoding.codes
|
|
177
|
+
b = b[:len(a)]
|
|
178
|
+
for i, v := range a {
|
|
179
|
+
if v != 0 && b[i].zero() {
|
|
180
|
+
return false
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
a = t.extraHist[:literalCount-256]
|
|
185
|
+
b = w.literalEncoding.codes[256:literalCount]
|
|
186
|
+
b = b[:len(a)]
|
|
187
|
+
for i, v := range a {
|
|
188
|
+
if v != 0 && b[i].zero() {
|
|
189
|
+
return false
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
a = t.litHist[:256]
|
|
194
|
+
b = w.literalEncoding.codes[:len(a)]
|
|
195
|
+
for i, v := range a {
|
|
196
|
+
if v != 0 && b[i].zero() {
|
|
197
|
+
return false
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return true
|
|
109
201
|
}
|
|
110
202
|
|
|
203
|
+
// flush flushes the currently encoded data.
|
|
204
|
+
// An EOB will be written if the current block hasn't been ended.
|
|
111
205
|
func (w *huffmanBitWriter) flush() {
|
|
112
206
|
if w.err != nil {
|
|
113
207
|
w.nbits = 0
|
|
114
208
|
return
|
|
115
209
|
}
|
|
210
|
+
if w.prevHeader > 0 {
|
|
211
|
+
// We owe an EOB
|
|
212
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
213
|
+
w.prevHeader = 0
|
|
214
|
+
}
|
|
116
215
|
n := w.nbytes
|
|
117
216
|
for w.nbits != 0 {
|
|
118
217
|
w.bytes[n] = byte(w.bits)
|
|
@@ -125,10 +224,14 @@ func (w *huffmanBitWriter) flush() {
|
|
|
125
224
|
n++
|
|
126
225
|
}
|
|
127
226
|
w.bits = 0
|
|
128
|
-
|
|
227
|
+
if n > 0 {
|
|
228
|
+
w.write(w.bytes[:n])
|
|
229
|
+
}
|
|
129
230
|
w.nbytes = 0
|
|
130
231
|
}
|
|
131
232
|
|
|
233
|
+
// write writes the provided bytes directly to the output,
|
|
234
|
+
// ignoring all queued bytes.
|
|
132
235
|
func (w *huffmanBitWriter) write(b []byte) {
|
|
133
236
|
if w.err != nil {
|
|
134
237
|
return
|
|
@@ -136,33 +239,16 @@ func (w *huffmanBitWriter) write(b []byte) {
|
|
|
136
239
|
_, w.err = w.writer.Write(b)
|
|
137
240
|
}
|
|
138
241
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
w.bits |= uint64(b) << w.nbits
|
|
242
|
+
// writeBits writes nb bits from b to the stream.
|
|
243
|
+
func (w *huffmanBitWriter) writeBits(b int32, nb uint8) {
|
|
244
|
+
w.bits |= uint64(b) << (w.nbits & 63)
|
|
144
245
|
w.nbits += nb
|
|
145
246
|
if w.nbits >= 48 {
|
|
146
|
-
|
|
147
|
-
w.bits >>= 48
|
|
148
|
-
w.nbits -= 48
|
|
149
|
-
n := w.nbytes
|
|
150
|
-
bytes := w.bytes[n : n+6]
|
|
151
|
-
bytes[0] = byte(bits)
|
|
152
|
-
bytes[1] = byte(bits >> 8)
|
|
153
|
-
bytes[2] = byte(bits >> 16)
|
|
154
|
-
bytes[3] = byte(bits >> 24)
|
|
155
|
-
bytes[4] = byte(bits >> 32)
|
|
156
|
-
bytes[5] = byte(bits >> 40)
|
|
157
|
-
n += 6
|
|
158
|
-
if n >= bufferFlushSize {
|
|
159
|
-
w.write(w.bytes[:n])
|
|
160
|
-
n = 0
|
|
161
|
-
}
|
|
162
|
-
w.nbytes = n
|
|
247
|
+
w.flushBits()
|
|
163
248
|
}
|
|
164
249
|
}
|
|
165
250
|
|
|
251
|
+
// writeBytes writes the provided bytes to the stream.
|
|
166
252
|
func (w *huffmanBitWriter) writeBytes(bytes []byte) {
|
|
167
253
|
if w.err != nil {
|
|
168
254
|
return
|
|
@@ -203,16 +289,16 @@ func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litE
|
|
|
203
289
|
// a copy of the frequencies, and as the place where we put the result.
|
|
204
290
|
// This is fine because the output is always shorter than the input used
|
|
205
291
|
// so far.
|
|
206
|
-
codegen := w.codegen // cache
|
|
292
|
+
codegen := w.codegen[:] // cache
|
|
207
293
|
// Copy the concatenated code sizes to codegen. Put a marker at the end.
|
|
208
294
|
cgnl := codegen[:numLiterals]
|
|
209
295
|
for i := range cgnl {
|
|
210
|
-
cgnl[i] =
|
|
296
|
+
cgnl[i] = litEnc.codes[i].len()
|
|
211
297
|
}
|
|
212
298
|
|
|
213
299
|
cgnl = codegen[numLiterals : numLiterals+numOffsets]
|
|
214
300
|
for i := range cgnl {
|
|
215
|
-
cgnl[i] =
|
|
301
|
+
cgnl[i] = offEnc.codes[i].len()
|
|
216
302
|
}
|
|
217
303
|
codegen[numLiterals+numOffsets] = badCode
|
|
218
304
|
|
|
@@ -234,10 +320,7 @@ func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litE
|
|
|
234
320
|
w.codegenFreq[size]++
|
|
235
321
|
count--
|
|
236
322
|
for count >= 3 {
|
|
237
|
-
n := 6
|
|
238
|
-
if n > count {
|
|
239
|
-
n = count
|
|
240
|
-
}
|
|
323
|
+
n := min(6, count)
|
|
241
324
|
codegen[outIndex] = 16
|
|
242
325
|
outIndex++
|
|
243
326
|
codegen[outIndex] = uint8(n - 3)
|
|
@@ -247,10 +330,7 @@ func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litE
|
|
|
247
330
|
}
|
|
248
331
|
} else {
|
|
249
332
|
for count >= 11 {
|
|
250
|
-
n := 138
|
|
251
|
-
if n > count {
|
|
252
|
-
n = count
|
|
253
|
-
}
|
|
333
|
+
n := min(138, count)
|
|
254
334
|
codegen[outIndex] = 18
|
|
255
335
|
outIndex++
|
|
256
336
|
codegen[outIndex] = uint8(n - 11)
|
|
@@ -282,30 +362,63 @@ func (w *huffmanBitWriter) generateCodegen(numLiterals int, numOffsets int, litE
|
|
|
282
362
|
codegen[outIndex] = badCode
|
|
283
363
|
}
|
|
284
364
|
|
|
285
|
-
//
|
|
286
|
-
func (w *huffmanBitWriter)
|
|
365
|
+
// codegens returns current number of non-zero codegens.
|
|
366
|
+
func (w *huffmanBitWriter) codegens() int {
|
|
367
|
+
numCodegens := len(w.codegenFreq)
|
|
368
|
+
for numCodegens > 4 && w.codegenFreq[codegenOrder[numCodegens-1]] == 0 {
|
|
369
|
+
numCodegens--
|
|
370
|
+
}
|
|
371
|
+
return numCodegens
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// headerSize returns the size of the header with the current encodings.
|
|
375
|
+
func (w *huffmanBitWriter) headerSize() (size, numCodegens int) {
|
|
287
376
|
numCodegens = len(w.codegenFreq)
|
|
288
377
|
for numCodegens > 4 && w.codegenFreq[codegenOrder[numCodegens-1]] == 0 {
|
|
289
378
|
numCodegens--
|
|
290
379
|
}
|
|
291
|
-
|
|
380
|
+
return 3 + 5 + 5 + 4 + (3 * numCodegens) +
|
|
292
381
|
w.codegenEncoding.bitLength(w.codegenFreq[:]) +
|
|
293
382
|
int(w.codegenFreq[16])*2 +
|
|
294
383
|
int(w.codegenFreq[17])*3 +
|
|
295
|
-
int(w.codegenFreq[18])*7
|
|
384
|
+
int(w.codegenFreq[18])*7, numCodegens
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// dynamicSize returns the size of dynamically encoded data in bits.
|
|
388
|
+
func (w *huffmanBitWriter) dynamicReuseSize(litEnc, offEnc *huffmanEncoder) (size int) {
|
|
389
|
+
size = litEnc.bitLength(w.literalFreq[:]) +
|
|
390
|
+
offEnc.bitLength(w.offsetFreq[:])
|
|
391
|
+
return size
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// dynamicSize returns the size of dynamically encoded data in bits.
|
|
395
|
+
func (w *huffmanBitWriter) dynamicSize(litEnc, offEnc *huffmanEncoder, extraBits int) (size, numCodegens int) {
|
|
396
|
+
header, numCodegens := w.headerSize()
|
|
296
397
|
size = header +
|
|
297
|
-
litEnc.bitLength(w.literalFreq) +
|
|
298
|
-
offEnc.bitLength(w.offsetFreq) +
|
|
398
|
+
litEnc.bitLength(w.literalFreq[:]) +
|
|
399
|
+
offEnc.bitLength(w.offsetFreq[:]) +
|
|
299
400
|
extraBits
|
|
300
|
-
|
|
301
401
|
return size, numCodegens
|
|
302
402
|
}
|
|
303
403
|
|
|
404
|
+
// extraBitSize returns the number of bits that will be written
|
|
405
|
+
// as "extra" bits on matches.
|
|
406
|
+
func (w *huffmanBitWriter) extraBitSize() int {
|
|
407
|
+
total := 0
|
|
408
|
+
for i, n := range w.literalFreq[257:literalCount] {
|
|
409
|
+
total += int(n) * int(lengthExtraBits[i&31])
|
|
410
|
+
}
|
|
411
|
+
for i, n := range w.offsetFreq[:offsetCodeCount] {
|
|
412
|
+
total += int(n) * int(offsetExtraBits[i&31])
|
|
413
|
+
}
|
|
414
|
+
return total
|
|
415
|
+
}
|
|
416
|
+
|
|
304
417
|
// fixedSize returns the size of dynamically encoded data in bits.
|
|
305
418
|
func (w *huffmanBitWriter) fixedSize(extraBits int) int {
|
|
306
419
|
return 3 +
|
|
307
|
-
fixedLiteralEncoding.bitLength(w.literalFreq) +
|
|
308
|
-
fixedOffsetEncoding.bitLength(w.offsetFreq) +
|
|
420
|
+
fixedLiteralEncoding().bitLength(w.literalFreq[:]) +
|
|
421
|
+
fixedOffsetEncoding().bitLength(w.offsetFreq[:]) +
|
|
309
422
|
extraBits
|
|
310
423
|
}
|
|
311
424
|
|
|
@@ -322,38 +435,43 @@ func (w *huffmanBitWriter) storedSize(in []byte) (int, bool) {
|
|
|
322
435
|
return 0, false
|
|
323
436
|
}
|
|
324
437
|
|
|
438
|
+
// writeCode writes 'c' to the stream.
|
|
325
439
|
func (w *huffmanBitWriter) writeCode(c hcode) {
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
329
|
-
w.bits |= uint64(c.code) << w.nbits
|
|
330
|
-
w.nbits += uint(c.len)
|
|
440
|
+
w.bits |= c.code64() << (w.nbits & reg8SizeMask64)
|
|
441
|
+
w.nbits += c.len()
|
|
331
442
|
if w.nbits >= 48 {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
443
|
+
w.flushBits()
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// flushBits writes accumulated bits to the byte buffer.
|
|
448
|
+
func (w *huffmanBitWriter) flushBits() {
|
|
449
|
+
bits := w.bits
|
|
450
|
+
w.bits >>= 48
|
|
451
|
+
w.nbits -= 48
|
|
452
|
+
n := w.nbytes
|
|
453
|
+
|
|
454
|
+
// We overwrite, but faster...
|
|
455
|
+
storeLE64(w.bytes[n:], bits)
|
|
456
|
+
n += 6
|
|
457
|
+
|
|
458
|
+
if n >= bufferFlushSize {
|
|
459
|
+
if w.err != nil {
|
|
346
460
|
n = 0
|
|
461
|
+
return
|
|
347
462
|
}
|
|
348
|
-
w.
|
|
463
|
+
w.write(w.bytes[:n])
|
|
464
|
+
n = 0
|
|
349
465
|
}
|
|
466
|
+
|
|
467
|
+
w.nbytes = n
|
|
350
468
|
}
|
|
351
469
|
|
|
352
|
-
//
|
|
470
|
+
// writeDynamicHeader writes the header of a dynamic Huffman block to the output stream.
|
|
353
471
|
//
|
|
354
|
-
//
|
|
355
|
-
//
|
|
356
|
-
//
|
|
472
|
+
// numLiterals is the number of literals specified in codegen.
|
|
473
|
+
// numOffsets is the number of offsets specified in codegen.
|
|
474
|
+
// numCodegens is the number of codegens used in codegen.
|
|
357
475
|
func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, numCodegens int, isEof bool) {
|
|
358
476
|
if w.err != nil {
|
|
359
477
|
return
|
|
@@ -367,19 +485,19 @@ func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, n
|
|
|
367
485
|
w.writeBits(int32(numOffsets-1), 5)
|
|
368
486
|
w.writeBits(int32(numCodegens-4), 4)
|
|
369
487
|
|
|
370
|
-
for i :=
|
|
371
|
-
value := uint(w.codegenEncoding.codes[codegenOrder[i]].len)
|
|
488
|
+
for i := range numCodegens {
|
|
489
|
+
value := uint(w.codegenEncoding.codes[codegenOrder[i]].len())
|
|
372
490
|
w.writeBits(int32(value), 3)
|
|
373
491
|
}
|
|
374
492
|
|
|
375
493
|
i := 0
|
|
376
494
|
for {
|
|
377
|
-
var codeWord
|
|
495
|
+
var codeWord = uint32(w.codegen[i])
|
|
378
496
|
i++
|
|
379
497
|
if codeWord == badCode {
|
|
380
498
|
break
|
|
381
499
|
}
|
|
382
|
-
w.writeCode(w.codegenEncoding.codes[
|
|
500
|
+
w.writeCode(w.codegenEncoding.codes[codeWord])
|
|
383
501
|
|
|
384
502
|
switch codeWord {
|
|
385
503
|
case 16:
|
|
@@ -395,10 +513,28 @@ func (w *huffmanBitWriter) writeDynamicHeader(numLiterals int, numOffsets int, n
|
|
|
395
513
|
}
|
|
396
514
|
}
|
|
397
515
|
|
|
516
|
+
// writeStoredHeader writes a stored header.
|
|
517
|
+
// If the stored block is only used for EOF,
|
|
518
|
+
// it is replaced with a fixed huffman block.
|
|
398
519
|
func (w *huffmanBitWriter) writeStoredHeader(length int, isEof bool) {
|
|
399
520
|
if w.err != nil {
|
|
400
521
|
return
|
|
401
522
|
}
|
|
523
|
+
if w.prevHeader > 0 {
|
|
524
|
+
// We owe an EOB
|
|
525
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
526
|
+
w.prevHeader = 0
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// To write EOF, use a fixed encoding block. 10 bits instead of 5 bytes.
|
|
530
|
+
if length == 0 && isEof {
|
|
531
|
+
w.writeFixedHeader(isEof)
|
|
532
|
+
// EOB: 7 bits, value: 0
|
|
533
|
+
w.writeBits(0, 7)
|
|
534
|
+
w.flush()
|
|
535
|
+
return
|
|
536
|
+
}
|
|
537
|
+
|
|
402
538
|
var flag int32
|
|
403
539
|
if isEof {
|
|
404
540
|
flag = 1
|
|
@@ -409,10 +545,17 @@ func (w *huffmanBitWriter) writeStoredHeader(length int, isEof bool) {
|
|
|
409
545
|
w.writeBits(int32(^uint16(length)), 16)
|
|
410
546
|
}
|
|
411
547
|
|
|
548
|
+
// writeFixedHeader writes a fixed encoding header to the output stream.
|
|
412
549
|
func (w *huffmanBitWriter) writeFixedHeader(isEof bool) {
|
|
413
550
|
if w.err != nil {
|
|
414
551
|
return
|
|
415
552
|
}
|
|
553
|
+
if w.prevHeader > 0 {
|
|
554
|
+
// We owe an EOB
|
|
555
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
556
|
+
w.prevHeader = 0
|
|
557
|
+
}
|
|
558
|
+
|
|
416
559
|
// Indicate that we are a fixed Huffman block
|
|
417
560
|
var value int32 = 2
|
|
418
561
|
if isEof {
|
|
@@ -421,41 +564,38 @@ func (w *huffmanBitWriter) writeFixedHeader(isEof bool) {
|
|
|
421
564
|
w.writeBits(value, 3)
|
|
422
565
|
}
|
|
423
566
|
|
|
424
|
-
// writeBlock
|
|
425
|
-
// The original input can be supplied, and if the
|
|
567
|
+
// writeBlock writes a block of tokens using the smallest encoding.
|
|
568
|
+
// The original input can be supplied, and if the Huffman-encoded data
|
|
426
569
|
// is larger than the original bytes, the data will be written as a
|
|
427
570
|
// stored block.
|
|
428
571
|
// If the input is nil, the tokens will always be Huffman encoded.
|
|
429
|
-
func (w *huffmanBitWriter) writeBlock(tokens
|
|
572
|
+
func (w *huffmanBitWriter) writeBlock(tokens *tokens, eof bool, input []byte) {
|
|
430
573
|
if w.err != nil {
|
|
431
574
|
return
|
|
432
575
|
}
|
|
433
576
|
|
|
434
|
-
tokens
|
|
577
|
+
tokens.AddEOB()
|
|
578
|
+
if w.prevHeader > 0 {
|
|
579
|
+
// We owe an EOB
|
|
580
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
581
|
+
w.prevHeader = 0
|
|
582
|
+
}
|
|
435
583
|
numLiterals, numOffsets := w.indexTokens(tokens)
|
|
436
|
-
|
|
584
|
+
w.generate()
|
|
437
585
|
var extraBits int
|
|
438
586
|
storedSize, storable := w.storedSize(input)
|
|
439
587
|
if storable {
|
|
440
|
-
|
|
441
|
-
// the length of offset fields (which will be the same for both fixed
|
|
442
|
-
// and dynamic encoding), if we need to compare those two encodings
|
|
443
|
-
// against stored encoding.
|
|
444
|
-
for lengthCode := lengthCodesStart + 8; lengthCode < numLiterals; lengthCode++ {
|
|
445
|
-
// First eight length codes have extra size = 0.
|
|
446
|
-
extraBits += int(w.literalFreq[lengthCode]) * int(lengthExtraBits[lengthCode-lengthCodesStart])
|
|
447
|
-
}
|
|
448
|
-
for offsetCode := 4; offsetCode < numOffsets; offsetCode++ {
|
|
449
|
-
// First four offset codes have extra size = 0.
|
|
450
|
-
extraBits += int(w.offsetFreq[offsetCode]) * int(offsetExtraBits[offsetCode])
|
|
451
|
-
}
|
|
588
|
+
extraBits = w.extraBitSize()
|
|
452
589
|
}
|
|
453
590
|
|
|
454
591
|
// Figure out smallest code.
|
|
455
592
|
// Fixed Huffman baseline.
|
|
456
|
-
var literalEncoding = fixedLiteralEncoding
|
|
457
|
-
var offsetEncoding = fixedOffsetEncoding
|
|
458
|
-
var size =
|
|
593
|
+
var literalEncoding = fixedLiteralEncoding()
|
|
594
|
+
var offsetEncoding = fixedOffsetEncoding()
|
|
595
|
+
var size = math.MaxInt32
|
|
596
|
+
if tokens.n < maxPredefinedTokens {
|
|
597
|
+
size = w.fixedSize(extraBits)
|
|
598
|
+
}
|
|
459
599
|
|
|
460
600
|
// Dynamic Huffman?
|
|
461
601
|
var numCodegens int
|
|
@@ -473,75 +613,175 @@ func (w *huffmanBitWriter) writeBlock(tokens []token, eof bool, input []byte) {
|
|
|
473
613
|
}
|
|
474
614
|
|
|
475
615
|
// Stored bytes?
|
|
476
|
-
if storable && storedSize
|
|
616
|
+
if storable && storedSize <= size {
|
|
477
617
|
w.writeStoredHeader(len(input), eof)
|
|
478
618
|
w.writeBytes(input)
|
|
479
619
|
return
|
|
480
620
|
}
|
|
481
621
|
|
|
482
622
|
// Huffman.
|
|
483
|
-
if literalEncoding == fixedLiteralEncoding {
|
|
623
|
+
if literalEncoding == fixedLiteralEncoding() {
|
|
484
624
|
w.writeFixedHeader(eof)
|
|
485
625
|
} else {
|
|
486
626
|
w.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)
|
|
487
627
|
}
|
|
488
628
|
|
|
489
629
|
// Write the tokens.
|
|
490
|
-
w.writeTokens(tokens, literalEncoding.codes, offsetEncoding.codes)
|
|
630
|
+
w.writeTokens(tokens.Slice(), literalEncoding.codes, offsetEncoding.codes)
|
|
491
631
|
}
|
|
492
632
|
|
|
493
633
|
// writeBlockDynamic encodes a block using a dynamic Huffman table.
|
|
494
634
|
// This should be used if the symbols used have a disproportionate
|
|
495
635
|
// histogram distribution.
|
|
496
|
-
|
|
497
|
-
// input size the block is stored.
|
|
498
|
-
func (w *huffmanBitWriter) writeBlockDynamic(tokens []token, eof bool, input []byte) {
|
|
636
|
+
func (w *huffmanBitWriter) writeBlockDynamic(tokens *tokens, eof bool, input []byte, sync bool) {
|
|
499
637
|
if w.err != nil {
|
|
500
638
|
return
|
|
501
639
|
}
|
|
502
640
|
|
|
503
|
-
|
|
641
|
+
sync = sync || eof
|
|
642
|
+
if sync {
|
|
643
|
+
tokens.AddEOB()
|
|
644
|
+
} else {
|
|
645
|
+
// Ensure we can always write EOB.
|
|
646
|
+
tokens.extraHist[0] = 1
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
// We cannot reuse pure Huffman table, and must mark as EOF.
|
|
650
|
+
if (w.wroteHuffman || eof) && w.prevHeader > 0 {
|
|
651
|
+
// We will not try to reuse.
|
|
652
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
653
|
+
w.prevHeader = 0
|
|
654
|
+
w.wroteHuffman = false
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
if w.prevHeader > 0 && !w.canReuse(tokens) {
|
|
658
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
659
|
+
w.prevHeader = 0
|
|
660
|
+
}
|
|
661
|
+
|
|
504
662
|
numLiterals, numOffsets := w.indexTokens(tokens)
|
|
663
|
+
extraBits := 0
|
|
664
|
+
ssize, storable := w.storedSize(input)
|
|
505
665
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
w.codegenEncoding.generate(w.codegenFreq[:], 7)
|
|
510
|
-
size, numCodegens := w.dynamicSize(w.literalEncoding, w.offsetEncoding, 0)
|
|
666
|
+
if storable || w.prevHeader > 0 {
|
|
667
|
+
extraBits = w.extraBitSize()
|
|
668
|
+
}
|
|
511
669
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
670
|
+
var size int
|
|
671
|
+
|
|
672
|
+
// Check whether we should reuse the previous Huffman table.
|
|
673
|
+
if w.prevHeader > 0 {
|
|
674
|
+
// Estimate size for using a new table.
|
|
675
|
+
// Use the previous header size as the best estimate.
|
|
676
|
+
newSize := w.prevHeader + tokens.EstimatedBits()
|
|
677
|
+
|
|
678
|
+
// The estimated size is calculated as an optimal table.
|
|
679
|
+
// We add a penalty to make it more realistic and re-use a bit more.
|
|
680
|
+
newSize += int(w.literalEncoding.codes[endBlockMarker].len()) + newSize>>w.logNewTablePenalty
|
|
681
|
+
|
|
682
|
+
// Calculate the size for reusing the current table.
|
|
683
|
+
reuseSize := w.dynamicReuseSize(w.literalEncoding, w.offsetEncoding) + extraBits
|
|
684
|
+
|
|
685
|
+
// Check if a new table is better.
|
|
686
|
+
if newSize < reuseSize {
|
|
687
|
+
// Write the EOB we owe.
|
|
688
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
689
|
+
size = newSize
|
|
690
|
+
w.prevHeader = 0
|
|
691
|
+
} else {
|
|
692
|
+
size = reuseSize
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
// Small blocks can be more efficient with fixed encoding.
|
|
696
|
+
if tokens.n < maxPredefinedTokens {
|
|
697
|
+
if preSize := w.fixedSize(extraBits) + 7; preSize < size {
|
|
698
|
+
// Check if we get a reasonable size decrease.
|
|
699
|
+
if storable && ssize <= size {
|
|
700
|
+
w.writeStoredHeader(len(input), eof)
|
|
701
|
+
w.writeBytes(input)
|
|
702
|
+
return
|
|
703
|
+
}
|
|
704
|
+
w.writeFixedHeader(eof)
|
|
705
|
+
if !sync {
|
|
706
|
+
tokens.AddEOB()
|
|
707
|
+
}
|
|
708
|
+
w.writeTokens(tokens.Slice(), fixedLiteralEncoding().codes, fixedOffsetEncoding().codes)
|
|
709
|
+
return
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
// Check if we get a reasonable size decrease.
|
|
714
|
+
if storable && ssize <= size {
|
|
715
|
+
w.writeStoredHeader(len(input), eof)
|
|
716
|
+
w.writeBytes(input)
|
|
717
|
+
return
|
|
718
|
+
}
|
|
517
719
|
}
|
|
518
720
|
|
|
519
|
-
//
|
|
520
|
-
w.
|
|
721
|
+
// We want a new block/table
|
|
722
|
+
if w.prevHeader == 0 {
|
|
723
|
+
w.literalFreq[endBlockMarker] = 1
|
|
724
|
+
|
|
725
|
+
w.generate()
|
|
726
|
+
// Generate codegen and codegenFrequencies, which indicates how to encode
|
|
727
|
+
// the literalEncoding and the offsetEncoding.
|
|
728
|
+
w.generateCodegen(numLiterals, numOffsets, w.literalEncoding, w.offsetEncoding)
|
|
729
|
+
w.codegenEncoding.generate(w.codegenFreq[:], 7)
|
|
730
|
+
|
|
731
|
+
var numCodegens int
|
|
732
|
+
size, numCodegens = w.dynamicSize(w.literalEncoding, w.offsetEncoding, extraBits)
|
|
733
|
+
|
|
734
|
+
// Store predefined or raw, if we don't get a reasonable improvement.
|
|
735
|
+
if tokens.n < maxPredefinedTokens {
|
|
736
|
+
if preSize := w.fixedSize(extraBits); preSize <= size {
|
|
737
|
+
// Store bytes, if we don't get an improvement.
|
|
738
|
+
if storable && ssize <= preSize {
|
|
739
|
+
w.writeStoredHeader(len(input), eof)
|
|
740
|
+
w.writeBytes(input)
|
|
741
|
+
return
|
|
742
|
+
}
|
|
743
|
+
w.writeFixedHeader(eof)
|
|
744
|
+
if !sync {
|
|
745
|
+
tokens.AddEOB()
|
|
746
|
+
}
|
|
747
|
+
w.writeTokens(tokens.Slice(), fixedLiteralEncoding().codes, fixedOffsetEncoding().codes)
|
|
748
|
+
return
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
if storable && ssize <= size {
|
|
753
|
+
// Store bytes, if we don't get an improvement.
|
|
754
|
+
w.writeStoredHeader(len(input), eof)
|
|
755
|
+
w.writeBytes(input)
|
|
756
|
+
return
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
// Write Huffman table.
|
|
760
|
+
w.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)
|
|
761
|
+
if !sync {
|
|
762
|
+
w.prevHeader, _ = w.headerSize()
|
|
763
|
+
}
|
|
764
|
+
w.wroteHuffman = false
|
|
765
|
+
}
|
|
521
766
|
|
|
767
|
+
if sync {
|
|
768
|
+
w.prevHeader = 0
|
|
769
|
+
}
|
|
522
770
|
// Write the tokens.
|
|
523
|
-
w.writeTokens(tokens, w.literalEncoding.codes, w.offsetEncoding.codes)
|
|
771
|
+
w.writeTokens(tokens.Slice(), w.literalEncoding.codes, w.offsetEncoding.codes)
|
|
524
772
|
}
|
|
525
773
|
|
|
526
|
-
// indexTokens indexes a slice of tokens, and
|
|
527
|
-
//
|
|
528
|
-
// and
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
774
|
+
// indexTokens indexes a slice of tokens, updates literalFreq and offsetFreq,
|
|
775
|
+
// and generates literalEncoding and offsetEncoding.
|
|
776
|
+
// It returns the number of literal and offset tokens.
|
|
777
|
+
func (w *huffmanBitWriter) indexTokens(t *tokens) (numLiterals, numOffsets int) {
|
|
778
|
+
*(*[256]uint16)(w.literalFreq[:]) = t.litHist
|
|
779
|
+
*(*[32]uint16)(w.literalFreq[256:]) = t.extraHist
|
|
780
|
+
w.offsetFreq = t.offHist
|
|
533
781
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
w.literalFreq[t.literal()]++
|
|
537
|
-
continue
|
|
538
|
-
}
|
|
539
|
-
length := t.length()
|
|
540
|
-
offset := t.offset()
|
|
541
|
-
w.literalFreq[lengthCodesStart+lengthCode(length)]++
|
|
542
|
-
w.offsetFreq[offsetCode(offset)]++
|
|
782
|
+
if t.n == 0 {
|
|
783
|
+
return
|
|
543
784
|
}
|
|
544
|
-
|
|
545
785
|
// get the number of literals
|
|
546
786
|
numLiterals = len(w.literalFreq)
|
|
547
787
|
for w.literalFreq[numLiterals-1] == 0 {
|
|
@@ -558,136 +798,319 @@ func (w *huffmanBitWriter) indexTokens(tokens []token) (numLiterals, numOffsets
|
|
|
558
798
|
w.offsetFreq[0] = 1
|
|
559
799
|
numOffsets = 1
|
|
560
800
|
}
|
|
561
|
-
w.literalEncoding.generate(w.literalFreq, 15)
|
|
562
|
-
w.offsetEncoding.generate(w.offsetFreq, 15)
|
|
563
801
|
return
|
|
564
802
|
}
|
|
565
803
|
|
|
804
|
+
// generate literalEncoding and offsetEncoding based on respective histograms.
|
|
805
|
+
func (w *huffmanBitWriter) generate() {
|
|
806
|
+
w.literalEncoding.generate(w.literalFreq[:literalCount], 15)
|
|
807
|
+
w.offsetEncoding.generate(w.offsetFreq[:offsetCodeCount], 15)
|
|
808
|
+
}
|
|
809
|
+
|
|
566
810
|
// writeTokens writes a slice of tokens to the output.
|
|
567
|
-
//
|
|
568
|
-
func (w *huffmanBitWriter) writeTokens(tokens []token,
|
|
811
|
+
// Codes for literal and offset encoding must be supplied.
|
|
812
|
+
func (w *huffmanBitWriter) writeTokens(tokens []token, lenCodes, offCodes []hcode) {
|
|
569
813
|
if w.err != nil {
|
|
570
814
|
return
|
|
571
815
|
}
|
|
816
|
+
if len(tokens) == 0 {
|
|
817
|
+
return
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
// Only last token should be endBlockMarker.
|
|
821
|
+
var deferEOB bool
|
|
822
|
+
if tokens[len(tokens)-1] == endBlockMarker {
|
|
823
|
+
tokens = tokens[:len(tokens)-1]
|
|
824
|
+
deferEOB = true
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
// Create slices up to the next power of two to avoid bounds checks.
|
|
828
|
+
lits := lenCodes[:256]
|
|
829
|
+
offs := offCodes[:32]
|
|
830
|
+
lengths := lenCodes[lengthCodesStart:]
|
|
831
|
+
lengths = lengths[:32]
|
|
832
|
+
|
|
833
|
+
// Go 1.16 LOVES having these on stack.
|
|
834
|
+
bits, nbits, nbytes := w.bits, w.nbits, w.nbytes
|
|
835
|
+
|
|
572
836
|
for _, t := range tokens {
|
|
573
|
-
if t <
|
|
574
|
-
|
|
837
|
+
if t < 256 {
|
|
838
|
+
c := lits[t]
|
|
839
|
+
bits |= c.code64() << (nbits & 63)
|
|
840
|
+
nbits += c.len()
|
|
841
|
+
if nbits >= 48 {
|
|
842
|
+
storeLE64(w.bytes[nbytes:], bits)
|
|
843
|
+
bits >>= 48
|
|
844
|
+
nbits -= 48
|
|
845
|
+
nbytes += 6
|
|
846
|
+
if nbytes >= bufferFlushSize {
|
|
847
|
+
if w.err != nil {
|
|
848
|
+
nbytes = 0
|
|
849
|
+
return
|
|
850
|
+
}
|
|
851
|
+
_, w.err = w.writer.Write(w.bytes[:nbytes])
|
|
852
|
+
nbytes = 0
|
|
853
|
+
}
|
|
854
|
+
}
|
|
575
855
|
continue
|
|
576
856
|
}
|
|
857
|
+
|
|
577
858
|
// Write the length
|
|
578
859
|
length := t.length()
|
|
579
|
-
|
|
580
|
-
w.writeCode(
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
860
|
+
lenCode := lengthCode(length) & 31
|
|
861
|
+
// inlined 'w.writeCode(lengths[lengthCode])'
|
|
862
|
+
c := lengths[lenCode]
|
|
863
|
+
bits |= c.code64() << (nbits & 63)
|
|
864
|
+
nbits += c.len()
|
|
865
|
+
if nbits >= 48 {
|
|
866
|
+
storeLE64(w.bytes[nbytes:], bits)
|
|
867
|
+
bits >>= 48
|
|
868
|
+
nbits -= 48
|
|
869
|
+
nbytes += 6
|
|
870
|
+
if nbytes >= bufferFlushSize {
|
|
871
|
+
if w.err != nil {
|
|
872
|
+
nbytes = 0
|
|
873
|
+
return
|
|
874
|
+
}
|
|
875
|
+
_, w.err = w.writer.Write(w.bytes[:nbytes])
|
|
876
|
+
nbytes = 0
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
if lenCode >= lengthExtraBitsMinCode {
|
|
881
|
+
extraLengthBits := lengthExtraBits[lenCode]
|
|
882
|
+
//w.writeBits(extraLength, extraLengthBits)
|
|
883
|
+
extraLength := int32(length - lengthBase[lenCode])
|
|
884
|
+
bits |= uint64(extraLength) << (nbits & 63)
|
|
885
|
+
nbits += extraLengthBits
|
|
886
|
+
if nbits >= 48 {
|
|
887
|
+
storeLE64(w.bytes[nbytes:], bits)
|
|
888
|
+
bits >>= 48
|
|
889
|
+
nbits -= 48
|
|
890
|
+
nbytes += 6
|
|
891
|
+
if nbytes >= bufferFlushSize {
|
|
892
|
+
if w.err != nil {
|
|
893
|
+
nbytes = 0
|
|
894
|
+
return
|
|
895
|
+
}
|
|
896
|
+
_, w.err = w.writer.Write(w.bytes[:nbytes])
|
|
897
|
+
nbytes = 0
|
|
898
|
+
}
|
|
899
|
+
}
|
|
585
900
|
}
|
|
586
901
|
// Write the offset
|
|
587
902
|
offset := t.offset()
|
|
588
|
-
|
|
589
|
-
w.writeCode(
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
903
|
+
offCode := (offset >> 16) & 31
|
|
904
|
+
// inlined 'w.writeCode(offs[offCode])'
|
|
905
|
+
c = offs[offCode]
|
|
906
|
+
bits |= c.code64() << (nbits & 63)
|
|
907
|
+
nbits += c.len()
|
|
908
|
+
if nbits >= 48 {
|
|
909
|
+
storeLE64(w.bytes[nbytes:], bits)
|
|
910
|
+
bits >>= 48
|
|
911
|
+
nbits -= 48
|
|
912
|
+
nbytes += 6
|
|
913
|
+
if nbytes >= bufferFlushSize {
|
|
914
|
+
if w.err != nil {
|
|
915
|
+
nbytes = 0
|
|
916
|
+
return
|
|
917
|
+
}
|
|
918
|
+
_, w.err = w.writer.Write(w.bytes[:nbytes])
|
|
919
|
+
nbytes = 0
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
if offCode >= offsetExtraBitsMinCode {
|
|
924
|
+
offsetComb := offsetCombined[offCode]
|
|
925
|
+
bits |= uint64((offset-(offsetComb>>8))&matchOffsetOnlyMask) << (nbits & 63)
|
|
926
|
+
nbits += uint8(offsetComb)
|
|
927
|
+
if nbits >= 48 {
|
|
928
|
+
storeLE64(w.bytes[nbytes:], bits)
|
|
929
|
+
bits >>= 48
|
|
930
|
+
nbits -= 48
|
|
931
|
+
nbytes += 6
|
|
932
|
+
if nbytes >= bufferFlushSize {
|
|
933
|
+
if w.err != nil {
|
|
934
|
+
nbytes = 0
|
|
935
|
+
return
|
|
936
|
+
}
|
|
937
|
+
_, w.err = w.writer.Write(w.bytes[:nbytes])
|
|
938
|
+
nbytes = 0
|
|
939
|
+
}
|
|
940
|
+
}
|
|
594
941
|
}
|
|
595
942
|
}
|
|
943
|
+
// Restore...
|
|
944
|
+
w.bits, w.nbits, w.nbytes = bits, nbits, nbytes
|
|
945
|
+
|
|
946
|
+
if deferEOB {
|
|
947
|
+
w.writeCode(lenCodes[endBlockMarker])
|
|
948
|
+
}
|
|
596
949
|
}
|
|
597
950
|
|
|
598
|
-
// huffOffset is a static offset encoder used for
|
|
951
|
+
// huffOffset is a static offset encoder used for Huffman-only encoding.
|
|
599
952
|
// It can be reused since we will not be encoding offset values.
|
|
600
|
-
var huffOffset *huffmanEncoder
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
offsetFreq[
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}
|
|
953
|
+
var huffOffset = sync.OnceValue(func() *huffmanEncoder {
|
|
954
|
+
w := newHuffmanBitWriter(nil)
|
|
955
|
+
w.offsetFreq[0] = 1
|
|
956
|
+
h := newHuffmanEncoder(offsetCodeCount)
|
|
957
|
+
h.generate(w.offsetFreq[:offsetCodeCount], 15)
|
|
958
|
+
return h
|
|
959
|
+
})
|
|
608
960
|
|
|
609
961
|
// writeBlockHuff encodes a block of bytes as either
|
|
610
|
-
// Huffman
|
|
611
|
-
// results
|
|
612
|
-
func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte) {
|
|
962
|
+
// Huffman-encoded literals or uncompressed bytes if the
|
|
963
|
+
// results gain very little from compression.
|
|
964
|
+
func (w *huffmanBitWriter) writeBlockHuff(eof bool, input []byte, sync bool) {
|
|
613
965
|
if w.err != nil {
|
|
614
966
|
return
|
|
615
967
|
}
|
|
616
968
|
|
|
617
969
|
// Clear histogram
|
|
618
|
-
clear(w.literalFreq)
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
w.literalFreq[endBlockMarker] = 1
|
|
970
|
+
clear(w.literalFreq[:])
|
|
971
|
+
if !w.wroteHuffman {
|
|
972
|
+
clear(w.offsetFreq[:])
|
|
973
|
+
}
|
|
624
974
|
|
|
625
975
|
const numLiterals = endBlockMarker + 1
|
|
626
|
-
w.offsetFreq[0] = 1
|
|
627
976
|
const numOffsets = 1
|
|
628
977
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
978
|
+
// Estimate size of literal encoding.
|
|
979
|
+
const guessHeaderSizeBits = 70 * 8 // 70 bytes; see https://stackoverflow.com/a/25454430
|
|
980
|
+
histogram(input, w.literalFreq[:numLiterals])
|
|
981
|
+
ssize, storable := w.storedSize(input)
|
|
982
|
+
if storable && len(input) > 1024 {
|
|
983
|
+
// Quick check for incompressible content.
|
|
984
|
+
// The following checks if all frequencies lie
|
|
985
|
+
// close to the average frequency.
|
|
986
|
+
// If so, we quickly store the data uncompressed.
|
|
987
|
+
// This will typically only trigger on random data.
|
|
988
|
+
// Most other data will typically exit after only a few iterations.
|
|
989
|
+
abs := float64(0)
|
|
990
|
+
avg := float64(len(input)) / 256
|
|
991
|
+
max := float64(len(input) * 2)
|
|
992
|
+
for _, v := range w.literalFreq[:256] {
|
|
993
|
+
diff := float64(v) - avg
|
|
994
|
+
abs += diff * diff
|
|
995
|
+
if abs >= max {
|
|
996
|
+
break
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
if abs < max {
|
|
1000
|
+
// No chance we can compress this...
|
|
1001
|
+
w.writeStoredHeader(len(input), eof)
|
|
1002
|
+
w.writeBytes(input)
|
|
1003
|
+
return
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
w.literalFreq[endBlockMarker] = 1
|
|
1007
|
+
w.tmpLitEncoding.generate(w.literalFreq[:numLiterals], 15)
|
|
1008
|
+
estBits := w.tmpLitEncoding.canEncodeLen(w.literalFreq[:numLiterals])
|
|
1009
|
+
if estBits < math.MaxInt32 {
|
|
1010
|
+
estBits += w.prevHeader
|
|
1011
|
+
if w.prevHeader == 0 {
|
|
1012
|
+
estBits += guessHeaderSizeBits
|
|
1013
|
+
}
|
|
1014
|
+
estBits += estBits >> w.logNewTablePenalty
|
|
1015
|
+
}
|
|
640
1016
|
|
|
641
1017
|
// Store bytes, if we don't get a reasonable improvement.
|
|
642
|
-
if
|
|
1018
|
+
if storable && ssize <= estBits {
|
|
643
1019
|
w.writeStoredHeader(len(input), eof)
|
|
644
1020
|
w.writeBytes(input)
|
|
645
1021
|
return
|
|
646
1022
|
}
|
|
647
1023
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
c := encoding[t]
|
|
655
|
-
w.bits |= uint64(c.code) << w.nbits
|
|
656
|
-
w.nbits += uint(c.len)
|
|
657
|
-
if w.nbits < 48 {
|
|
658
|
-
continue
|
|
1024
|
+
if w.prevHeader > 0 {
|
|
1025
|
+
reuseSize := w.literalEncoding.canEncodeLen(w.literalFreq[:256])
|
|
1026
|
+
if estBits < reuseSize {
|
|
1027
|
+
// We owe an EOB
|
|
1028
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
1029
|
+
w.prevHeader = 0
|
|
659
1030
|
}
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
if w.prevHeader == 0 {
|
|
1034
|
+
// Use the temp encoding, so swap.
|
|
1035
|
+
w.literalEncoding, w.tmpLitEncoding = w.tmpLitEncoding, w.literalEncoding
|
|
1036
|
+
// Generate codegen and codegenFrequencies, which indicates how to encode
|
|
1037
|
+
// the literalEncoding and the offsetEncoding.
|
|
1038
|
+
w.generateCodegen(numLiterals, numOffsets, w.literalEncoding, huffOffset())
|
|
1039
|
+
w.codegenEncoding.generate(w.codegenFreq[:], 7)
|
|
1040
|
+
numCodegens := w.codegens()
|
|
1041
|
+
|
|
1042
|
+
// Huffman.
|
|
1043
|
+
w.writeDynamicHeader(numLiterals, numOffsets, numCodegens, eof)
|
|
1044
|
+
w.wroteHuffman = true
|
|
1045
|
+
w.prevHeader, _ = w.headerSize()
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
encoding := w.literalEncoding.codes[:256]
|
|
1049
|
+
// Go 1.16 LOVES having these on stack. At least 1.5x the speed.
|
|
1050
|
+
bits, nbits, nbytes := w.bits, w.nbits, w.nbytes
|
|
1051
|
+
|
|
1052
|
+
// Unroll, write 3 codes/loop.
|
|
1053
|
+
// Fastest number of unrolls.
|
|
1054
|
+
for len(input) > 3 {
|
|
1055
|
+
// We must have at least 48 bits free.
|
|
1056
|
+
if nbits >= 8 {
|
|
1057
|
+
n := nbits >> 3
|
|
1058
|
+
storeLE64(w.bytes[nbytes:], bits)
|
|
1059
|
+
bits >>= (n * 8) & 63
|
|
1060
|
+
nbits -= n * 8
|
|
1061
|
+
nbytes += n
|
|
674
1062
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
1063
|
+
if nbytes >= bufferFlushSize {
|
|
1064
|
+
if w.err != nil {
|
|
1065
|
+
nbytes = 0
|
|
1066
|
+
return
|
|
1067
|
+
}
|
|
1068
|
+
_, w.err = w.writer.Write(w.bytes[:nbytes])
|
|
1069
|
+
nbytes = 0
|
|
678
1070
|
}
|
|
679
|
-
|
|
1071
|
+
a, b := encoding[input[0]], encoding[input[1]]
|
|
1072
|
+
bits |= a.code64() << (nbits & 63)
|
|
1073
|
+
bits |= b.code64() << ((nbits + a.len()) & 63)
|
|
1074
|
+
c := encoding[input[2]]
|
|
1075
|
+
nbits += b.len() + a.len()
|
|
1076
|
+
bits |= c.code64() << (nbits & 63)
|
|
1077
|
+
nbits += c.len()
|
|
1078
|
+
input = input[3:]
|
|
680
1079
|
}
|
|
681
|
-
w.nbytes = n
|
|
682
|
-
w.writeCode(encoding[endBlockMarker])
|
|
683
|
-
}
|
|
684
1080
|
|
|
685
|
-
//
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
1081
|
+
// Remaining...
|
|
1082
|
+
for _, t := range input {
|
|
1083
|
+
if nbits >= 48 {
|
|
1084
|
+
storeLE64(w.bytes[nbytes:], bits)
|
|
1085
|
+
bits >>= 48
|
|
1086
|
+
nbits -= 48
|
|
1087
|
+
nbytes += 6
|
|
1088
|
+
if nbytes >= bufferFlushSize {
|
|
1089
|
+
if w.err != nil {
|
|
1090
|
+
nbytes = 0
|
|
1091
|
+
return
|
|
1092
|
+
}
|
|
1093
|
+
_, w.err = w.writer.Write(w.bytes[:nbytes])
|
|
1094
|
+
nbytes = 0
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
// Bitwriting inlined, ~30% speedup
|
|
1098
|
+
c := encoding[t]
|
|
1099
|
+
bits |= c.code64() << (nbits & 63)
|
|
1100
|
+
|
|
1101
|
+
nbits += c.len()
|
|
1102
|
+
}
|
|
1103
|
+
// Restore...
|
|
1104
|
+
w.bits, w.nbits, w.nbytes = bits, nbits, nbytes
|
|
1105
|
+
|
|
1106
|
+
// Flush if needed to have space.
|
|
1107
|
+
if w.nbits >= 48 {
|
|
1108
|
+
w.flushBits()
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
if eof || sync {
|
|
1112
|
+
w.writeCode(w.literalEncoding.codes[endBlockMarker])
|
|
1113
|
+
w.prevHeader = 0
|
|
1114
|
+
w.wroteHuffman = false
|
|
692
1115
|
}
|
|
693
1116
|
}
|