Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewBuffer (0.12 sec)

  1. src/bytes/buffer.go

    	slice, err := b.readSlice(delim)
    	return string(slice), err
    }
    
    // NewBuffer creates and initializes a new [Buffer] using buf as its
    // initial contents. The new [Buffer] takes ownership of buf, and the
    // caller should not use buf after this call. NewBuffer is intended to
    // prepare a [Buffer] to read existing data. It can also be used to set
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Oct 29 16:47:05 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. src/bufio/bufio_test.go

    	srcBuf := bytes.NewBuffer(make([]byte, 8192))
    	src := NewReader(onlyReader{srcBuf})
    	dstBuf := new(bytes.Buffer)
    	dst := onlyWriter{dstBuf}
    	for i := 0; i < b.N; i++ {
    		srcBuf.Reset()
    		src.Reset(onlyReader{srcBuf})
    		dstBuf.Reset()
    		io.Copy(dst, src)
    	}
    }
    
    func BenchmarkReaderCopyNoWriteTo(b *testing.B) {
    	srcBuf := bytes.NewBuffer(make([]byte, 8192))
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  3. cmd/erasure-object.go

    	for i, disk := range onlineDisks {
    		if disk == nil {
    			continue
    		}
    		if disk.IsOnline() {
    			buf := grid.GetByteBufferCap(int(erasure.ShardFileSize(data.Size())) + 64)
    			inlineBuffers[i] = bytes.NewBuffer(buf[:0])
    			defer grid.PutByteBuffer(buf)
    			writers[i] = newStreamingBitrotWriterBuffer(inlineBuffers[i], DefaultBitrotAlgorithm, erasure.ShardSize())
    		}
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 78.8K bytes
    - Viewed (0)
Back to top