- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for NewReaderSize (0.1 sec)
-
src/bufio/bufio_test.go
const BufSize = 1000 b := NewReaderSize(strings.NewReader("hello world"), BufSize) // Does it recognize itself? b1 := NewReaderSize(b, BufSize) if b1 != b { t.Error("NewReaderSize did not detect underlying Reader") } // Does it wrap if existing buffer is too small? b2 := NewReaderSize(b, 2*BufSize) if b2 == b { t.Error("NewReaderSize did not enlarge buffer") } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
cmd/streaming-signature-v4_test.go
// Test - 4 bytes.NewReader([]byte("1000;chunk-signature=111123333333333333334444211\r\n")), } testCases := []testCase{ // Test - 1 - small bufio reader. { bufio.NewReaderSize(readers[0], 16), errLineTooLong, nil, nil, }, // Test - 2 - unexpected end of the reader. { bufio.NewReader(readers[1]), io.ErrUnexpectedEOF, nil, nil, },
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 23 18:58:53 UTC 2021 - 5.7K bytes - Viewed (0) -
internal/s3select/json/preader.go
// Should only be used for LINES types. func NewPReader(readCloser io.ReadCloser, args *ReaderArgs) *PReader { r := &PReader{ args: args, buf: bufio.NewReaderSize(readCloser, jsonSplitSize*2), readCloser: readCloser, close: make(chan struct{}), } r.startReaders() return r
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.5K bytes - Viewed (0) -
src/bufio/bufio.go
} const minReadBufferSize = 16 const maxConsecutiveEmptyReads = 100 // NewReaderSize returns a new [Reader] whose buffer has at least the specified // size. If the argument io.Reader is already a [Reader] with large enough // size, it returns the underlying [Reader]. func NewReaderSize(rd io.Reader, size int) *Reader { // Is it already a Reader? b, ok := rd.(*Reader) if ok && len(b.buf) >= size {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
internal/s3select/csv/reader.go
recordDelimiter: []byte(args.RecordDelimiter), oneByte: make([]byte, len(args.RecordDelimiter)-1), } } r := &Reader{ args: args, buf: bufio.NewReaderSize(csvIn, csvSplitSize*2), readCloser: readCloser, close: make(chan struct{}), } // Assume args are validated by ReaderArgs.UnmarshalXML() newCsvReader := func(r io.Reader) *csv.Reader {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 8.9K bytes - Viewed (0) -
cmd/storage-rest-client.go
// The reader will be buffered. // Return with readMsgpReaderPoolPut when done. func msgpNewReader(r io.Reader) *msgp.Reader { p := readMsgpReaderPool.Get().(*msgp.Reader) if p.R == nil { p.R = xbufio.NewReaderSize(r, 32<<10) } else { p.R.Reset(r) } return p } // readMsgpReaderPoolPut can be used to reuse a *msgp.Reader. func readMsgpReaderPoolPut(r *msgp.Reader) { if r != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:07:21 UTC 2024 - 30.2K bytes - Viewed (0) -
cmd/object-multipart-handlers.go
in := io.Reader(hashReader) if size > encryptBufferThreshold { // The encryption reads in blocks of 64KB. // We add a buffer on bigger files to reduce the number of syscalls upstream. in = bufio.NewReaderSize(hashReader, encryptBufferSize) } var nonce [12]byte tmp := sha256.Sum256([]byte(fmt.Sprint(uploadID, partID))) copy(nonce[:], tmp[:12]) reader, err = sio.EncryptReader(in, sio.Config{
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Aug 31 18:25:48 UTC 2024 - 39.2K bytes - Viewed (0) -
cmd/encryption-v1.go
if r.ContentLength > encryptBufferThreshold { // The encryption reads in blocks of 64KB. // We add a buffer on bigger files to reduce the number of syscalls upstream. content = bufio.NewReaderSize(content, encryptBufferSize) } var ( key []byte keyID string ctx kms.Context err error ) kind, _ := crypto.IsRequested(r.Header) if kind == crypto.SSEC {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Oct 13 13:06:08 UTC 2024 - 37.2K bytes - Viewed (0) -
cmd/object-api-utils.go
cFns[i]() } return nil, err } } decReader := io.LimitReader(s2Reader, decLength) if decLength > compReadAheadSize { rah, err := readahead.NewReaderSize(decReader, compReadAheadBuffers, compReadAheadBufSize) if err == nil { decReader = rah cFns = append([]func(){func() { rah.Close() }}, cFns...) } } oi.Size = decLength
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0) -
api/go1.txt
pkg archive/zip, var ErrChecksum error pkg archive/zip, var ErrFormat error pkg bufio, func NewReadWriter(*Reader, *Writer) *ReadWriter pkg bufio, func NewReader(io.Reader) *Reader pkg bufio, func NewReaderSize(io.Reader, int) *Reader pkg bufio, func NewWriter(io.Writer) *Writer pkg bufio, func NewWriterSize(io.Writer, int) *Writer pkg bufio, method (*Reader) Buffered() int pkg bufio, method (*Reader) Peek(int) ([]uint8, error)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)