Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 109 for buf4 (0.07 sec)

  1. src/crypto/ecdh/nist.go

    		panic("crypto/ecdh: internal error: isLess input too large")
    	}
    	bufA, bufB := make([]byte, 72), make([]byte, 72)
    	for i := range a {
    		bufA[i], bufB[i] = a[len(a)-i-1], b[len(b)-i-1]
    	}
    
    	// Perform a subtraction with borrow.
    	var borrow uint64
    	for i := 0; i < len(bufA); i += 8 {
    		limbA, limbB := byteorder.LeUint64(bufA[i:]), byteorder.LeUint64(bufB[i:])
    		_, borrow = bits.Sub64(limbA, limbB, borrow)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  2. src/net/http/response_test.go

    			}
    			fatalf(msg+": %v", err)
    		}
    		var buf bytes.Buffer
    		buf.WriteString("HTTP/1.1 200 OK\r\n")
    		if test.chunked {
    			buf.WriteString("Transfer-Encoding: chunked\r\n")
    		} else {
    			buf.WriteString("Content-Length: 1000000\r\n")
    		}
    		var wr io.Writer = &buf
    		if test.chunked {
    			wr = internal.NewChunkedWriter(wr)
    		}
    		if test.compressed {
    			buf.WriteString("Content-Encoding: gzip\r\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 19:01:29 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  3. src/io/multi_test.go

    	func() {
    		buf1 := bytes.NewReader([]byte("foo"))
    		buf2 := bytes.NewReader([]byte("bar"))
    		mr = MultiReader(buf1, buf2)
    		runtime.SetFinalizer(buf1, func(*bytes.Reader) {
    			close(closed)
    		})
    	}()
    
    	buf := make([]byte, 4)
    	if n, err := ReadFull(mr, buf); err != nil || string(buf) != "foob" {
    		t.Fatalf(`ReadFull = %d (%q), %v; want 3, "foo", nil`, n, buf[:n], err)
    	}
    
    	runtime.GC()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:32 UTC 2022
    - 10K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/parser_test.go

    }
    
    func verifyPrint(t *testing.T, filename string, ast1 *File) {
    	var buf1 bytes.Buffer
    	_, err := Fprint(&buf1, ast1, LineForm)
    	if err != nil {
    		panic(err)
    	}
    	bytes1 := buf1.Bytes()
    
    	ast2, err := Parse(NewFileBase(filename), &buf1, nil, nil, 0)
    	if err != nil {
    		panic(err)
    	}
    
    	var buf2 bytes.Buffer
    	_, err = Fprint(&buf2, ast2, LineForm)
    	if err != nil {
    		panic(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 16:30:19 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  5. guava/src/com/google/common/io/ByteSource.java

        checkNotNull(other);
    
        byte[] buf1 = createBuffer();
        byte[] buf2 = createBuffer();
    
        Closer closer = Closer.create();
        try {
          InputStream in1 = closer.register(openStream());
          InputStream in2 = closer.register(other.openStream());
          while (true) {
            int read1 = ByteStreams.read(in1, buf1, 0, buf1.length);
            int read2 = ByteStreams.read(in2, buf2, 0, buf2.length);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 17 14:35:11 UTC 2023
    - 26.2K bytes
    - Viewed (0)
  6. src/bytes/bytes_test.go

    			if j != n-3 {
    				b.Fatal("bad index", j)
    			}
    		}
    		buf[n-3] = '\x00'
    		buf[n-2] = '\x00'
    		buf[n-1] = '\x00'
    	}
    }
    
    func BenchmarkEqual(b *testing.B) {
    	b.Run("0", func(b *testing.B) {
    		var buf [4]byte
    		buf1 := buf[0:0]
    		buf2 := buf[1:1]
    		for i := 0; i < b.N; i++ {
    			eq := Equal(buf1, buf2)
    			if !eq {
    				b.Fatal("bad equal")
    			}
    		}
    	})
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/io/ByteSource.java

        checkNotNull(other);
    
        byte[] buf1 = createBuffer();
        byte[] buf2 = createBuffer();
    
        Closer closer = Closer.create();
        try {
          InputStream in1 = closer.register(openStream());
          InputStream in2 = closer.register(other.openStream());
          while (true) {
            int read1 = ByteStreams.read(in1, buf1, 0, buf1.length);
            int read2 = ByteStreams.read(in2, buf2, 0, buf2.length);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 17 14:35:11 UTC 2023
    - 26.2K bytes
    - Viewed (0)
  8. src/cmd/internal/bio/buf.go

    Cherry Zhang <******@****.***> 1596156569 -0400
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 11 17:15:15 UTC 2020
    - 3.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/allocator_test.go

    	target := &Allocator{}
    	initialSize := 1000000 // 1MB
    	buff := target.Allocate(uint64(initialSize))
    	if cap(buff) < initialSize {
    		t.Fatalf("unexpected size of the buffer, expected at least 1MB, got: %v", cap(buff))
    	}
    	if len(buff) != initialSize {
    		t.Fatalf("unexpected length of the buffer, expected: %v, got: %v", initialSize, len(buff))
    	}
    
    	buff = target.Allocate(0)
    	if cap(buff) < initialSize {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 13:38:29 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  10. src/debug/dwarf/buf.go

    	return 0
    }
    
    func makeBuf(d *Data, format dataFormat, name string, off Offset, data []byte) buf {
    	return buf{d, d.order, format, name, off, data, nil}
    }
    
    func (b *buf) uint8() uint8 {
    	if len(b.data) < 1 {
    		b.error("underflow")
    		return 0
    	}
    	val := b.data[0]
    	b.data = b.data[1:]
    	b.off++
    	return val
    }
    
    func (b *buf) bytes(n int) []byte {
    	if n < 0 || len(b.data) < n {
    		b.error("underflow")
    		return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 21 17:14:08 UTC 2022
    - 3.7K bytes
    - Viewed (0)
Back to top