- Sort Score
- Result 10 results
- Languages All
Results 31 - 37 of 37 for GetBytes (0.14 sec)
-
src/crypto/x509/name_constraints_test.go
var serialBytes [16]byte rand.Read(serialBytes[:]) template := &Certificate{ SerialNumber: new(big.Int).SetBytes(serialBytes[:]), Subject: pkix.Name{ CommonName: name, }, NotBefore: time.Unix(1000, 0), NotAfter: time.Unix(2000, 0), KeyUsage: KeyUsageCertSign,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 09 22:40:21 UTC 2024 - 45.2K bytes - Viewed (0) -
src/net/http/request_test.go
--MyBoundary-- ` func benchmarkReadRequest(b *testing.B, request string) { request = request + "\n" // final \n request = strings.ReplaceAll(request, "\n", "\r\n") // expand \n to \r\n b.SetBytes(int64(len(request))) r := bufio.NewReader(&infiniteReader{buf: []byte(request)}) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { _, err := ReadRequest(r) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 18:42:34 UTC 2024 - 44K bytes - Viewed (0) -
src/image/jpeg/reader_test.go
data, err := os.ReadFile(filename) if err != nil { b.Fatal(err) } cfg, err := DecodeConfig(bytes.NewReader(data)) if err != nil { b.Fatal(err) } b.SetBytes(int64(cfg.Width * cfg.Height * 4)) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { Decode(bytes.NewReader(data)) } } func BenchmarkDecodeBaseline(b *testing.B) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 25 00:46:29 UTC 2024 - 24.4K bytes - Viewed (0) -
src/go/internal/gcimporter/iimport.go
v := -n if signed { v = -(n &^ 1) >> 1 } if v < 1 || uint(v) > maxBytes { errorf("weird decoding: %v, %v => %v", n, signed, v) } b := make([]byte, v) io.ReadFull(&r.declReader, b) x.SetBytes(b) if signed && n&1 != 0 { x.Neg(x) } } func (r *importReader) mpfloat(typ *types.Basic) constant.Value { var mant big.Int r.mpint(&mant, typ) var f big.Float f.SetInt(&mant)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.2K bytes - Viewed (0) -
src/math/big/nat.go
func bigEndianWord(buf []byte) Word { if _W == 64 { return Word(byteorder.BeUint64(buf)) } return Word(byteorder.BeUint32(buf)) } // setBytes interprets buf as the bytes of a big-endian unsigned // integer, sets z to that value, and returns z. func (z nat) setBytes(buf []byte) nat { z = z.make((len(buf) + _S - 1) / _S) i := len(buf) for k := 0; i >= _S; k++ { z[k] = bigEndianWord(buf[i-_S : i])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 31.7K bytes - Viewed (0) -
src/runtime/hash_test.go
for i := range b { b[i] = byte(r.Uint32()) } } func benchmarkHash(b *testing.B, n int) { s := strings.Repeat("A", n) for i := 0; i < b.N; i++ { StringHash(s, 0) } b.SetBytes(int64(n)) } func BenchmarkHash5(b *testing.B) { benchmarkHash(b, 5) } func BenchmarkHash16(b *testing.B) { benchmarkHash(b, 16) } func BenchmarkHash64(b *testing.B) { benchmarkHash(b, 64) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 17:50:18 UTC 2024 - 18.4K bytes - Viewed (0) -
src/encoding/json/decode.go
break } b := make([]byte, base64.StdEncoding.DecodedLen(len(s))) n, err := base64.StdEncoding.Decode(b, s) if err != nil { d.saveError(err) break } v.SetBytes(b[:n]) case reflect.String: t := string(s) if v.Type() == numberType && !isValidNumber(t) { return fmt.Errorf("json: invalid number literal, trying to unmarshal %q into Number", item) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 35.3K bytes - Viewed (0)