- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for bytes (0.14 sec)
-
internal/s3select/json/reader.go
} } // syncReadCloser will wrap a readcloser and make it safe to call Close while // reads are running. type syncReadCloser struct { rc io.ReadCloser mu sync.Mutex } func (pr *syncReadCloser) Read(p []byte) (n int, err error) { // This ensures that Close will block until Read has completed. // This allows another goroutine to close the reader. pr.mu.Lock() defer pr.mu.Unlock() if pr.rc == nil { return 0, io.EOF
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Mar 24 03:58:53 GMT 2022 - 3K bytes - Viewed (0) -
src/bytes/reader.go
type Reader struct { s []byte i int64 // current reading index prevRune int // index of previous rune; or < 0 } // Len returns the number of bytes of the unread portion of the // slice. func (r *Reader) Len() int { if r.i >= int64(len(r.s)) { return 0 } return int(int64(len(r.s)) - r.i) } // Size returns the original length of the underlying byte slice.
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 3.9K bytes - Viewed (0) -
internal/s3select/parquet/reader.go
} var value interface{} switch val := v.(type) { case []byte: // TODO: only strings are supported in s3select output (not // binary arrays) - perhaps we need to check the annotation to // ensure it's UTF8 encoded. value = string(val) case [12]byte: // TODO: This is returned for the parquet INT96 type. We just // treat it same as []byte (but AWS S3 treats it as a large int) // - fix this later.
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 14 13:54:47 GMT 2022 - 4.5K bytes - Viewed (0) -
src/archive/tar/reader.go
// - Exactly 0 bytes are read and EOF is hit. // - Exactly 1 block of zeros is read and EOF is hit. // - At least 2 blocks of zeros are read. func (tr *Reader) readHeader() (*Header, *block, error) { // Two blocks of zero bytes marks the end of the archive. if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil { return nil, nil, err // EOF is okay here; exactly 0 bytes read }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
internal/etag/reader.go
} // UUIDHash - use uuid to make md5sum type UUIDHash struct { uuid []byte } // Write - implement hash.Hash Write func (u UUIDHash) Write(p []byte) (n int, err error) { return len(p), nil } // Sum - implement md5.Sum func (u UUIDHash) Sum(b []byte) []byte { return u.uuid } // Reset - implement hash.Hash Reset func (u UUIDHash) Reset() { return }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 4.8K bytes - Viewed (0) -
internal/s3select/csv/reader.go
r.err = io.EOF } return r.readCloser.Close() } // nextSplit will attempt to skip a number of bytes and // return the buffer until the next newline occurs. // The last block will be sent along with an io.EOF. func (r *Reader) nextSplit(skip int, dst []byte) ([]byte, error) { if cap(dst) < skip { dst = make([]byte, 0, skip+1024) } dst = dst[:skip] if skip > 0 { n, err := io.ReadFull(r.buf, dst)
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 8.9K bytes - Viewed (0) -
internal/hash/reader.go
// result in a different checksum. func (r *Reader) MD5Current() []byte { if r.disableMD5 { return r.checksum } return r.ETag()[:] } // SHA256 returns the SHA256 checksum set as reference value. // // It corresponds to the checksum that is expected and // not the actual SHA256 checksum of the content. func (r *Reader) SHA256() []byte { return r.contentSHA256 }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Sep 18 17:00:54 GMT 2023 - 10.8K bytes - Viewed (0) -
internal/bucket/bandwidth/reader.go
// Read implements a throttled read func (r *MonitoredReader) Read(buf []byte) (n int, err error) { if r.throttle == nil { return r.r.Read(buf) } if r.lastErr != nil { err = r.lastErr return } b := r.throttle.Burst() // maximum available tokens need := len(buf) // number of bytes requested by caller hdr := r.opts.HeaderSize // remaining header bytes var tokens int // number of tokens to request
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Wed Sep 06 03:21:59 GMT 2023 - 3.1K bytes - Viewed (0) -
src/archive/zip/reader.go
// // dataDescriptorLen includes the size of the signature but // first read just those 4 bytes to see if it exists. if _, err := io.ReadFull(r, buf[:4]); err != nil { return err } off := 0 maybeSig := readBuf(buf[:4]) if maybeSig.uint32() != dataDescriptorSignature { // No data descriptor signature. Keep these four // bytes. off += 4 } if _, err := io.ReadFull(r, buf[off:12]); err != nil { return err
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 27.7K bytes - Viewed (0) -
internal/s3select/simdj/reader.go
} // safeCloser will wrap a Reader as a ReadCloser. // It is safe to call Close while the reader is being used. type safeCloser struct { closed uint32 r io.Reader } func (s *safeCloser) Read(p []byte) (n int, err error) { if atomic.LoadUint32(&s.closed) == 1 { return 0, io.EOF } n, err = s.r.Read(p) if atomic.LoadUint32(&s.closed) == 1 { return 0, io.EOF } return n, err }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue May 30 17:02:22 GMT 2023 - 4.9K bytes - Viewed (0)