- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for ReadAt (0.07 sec)
-
src/bytes/reader.go
return 0, io.EOF } r.prevRune = -1 n = copy(b, r.s[r.i:]) r.i += int64(n) return } // ReadAt implements the [io.ReaderAt] interface. func (r *Reader) ReadAt(b []byte, off int64) (n int, err error) { // cannot modify state - see io.ReaderAt if off < 0 { return 0, errors.New("bytes.Reader.ReadAt: negative offset") } if off >= int64(len(r.s)) { return 0, io.EOF } n = copy(b, r.s[off:])
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Jul 16 18:17:37 UTC 2024 - 3.9K bytes - Viewed (0) -
cmd/erasure-decode.go
missingPartsHeal := int32(0) // Atomic bool flag. readerIndex := 0 var wg sync.WaitGroup // if readTrigger is true, it implies next disk.ReadAt() should be tried // if readTrigger is false, it implies previous disk.ReadAt() was successful and there is no need // to try reading the next disk. for readTrigger := range readTriggerCh { newBufLK.RLock() canDecode := p.canDecode(newBuf)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 29 01:40:52 UTC 2024 - 9.5K bytes - Viewed (0) -
cmd/bitrot-streaming.go
} return nil } func (b *streamingBitrotReader) ReadAt(buf []byte, offset int64) (int, error) { var err error if offset%b.shardSize != 0 { // Offset should always be aligned to b.shardSize // Can never happen unless there are programmer bugs return 0, errUnexpected } if b.rc == nil { // For the first ReadAt() call we need to open the stream for reading. b.currOffset = offset
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 12:20:54 UTC 2024 - 6K bytes - Viewed (0) -
src/archive/zip/reader.go
// findBodyOffset does the minimum work to verify the file has a header // and returns the file body offset. func (f *File) findBodyOffset() (int64, error) { var buf [fileHeaderLen]byte if _, err := f.zipr.ReadAt(buf[:], f.headerOffset); err != nil { return 0, err } b := readBuf(buf[:]) if sig := b.uint32(); sig != fileHeaderSignature { return 0, ErrFormat } b = b[22:] // skip over most of the header
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
cmd/sftp-server-driver.go
minio.PutObjectOptions{DisableContentSha256: true}, ) return err } return NotImplemented{} } type listerAt []os.FileInfo // Modeled after strings.Reader's ReadAt() implementation func (f listerAt) ListAt(ls []os.FileInfo, offset int64) (int, error) { var n int if offset >= int64(len(f)) { return 0, io.EOF } n = copy(ls, f[offset:]) if n < len(ls) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 05 07:51:13 UTC 2024 - 11.1K bytes - Viewed (0) -
src/archive/zip/reader_test.go
var z *Reader var err error var raw []byte if zt.Source != nil { rat, size := zt.Source() z, err = NewReader(rat, size) raw = make([]byte, size) if _, err := rat.ReadAt(raw, 0); err != nil { t.Errorf("ReadAt error=%v", err) return } } else { path := filepath.Join("testdata", zt.Name) if zt.Obscured { tf, err := obscuretestdata.DecodeToTempFile(path) if err != nil {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 55.6K bytes - Viewed (0) -
cmd/xl-storage.go
} // Verify it is a regular file, otherwise subsequent Seek is // undefined. if !st.Mode().IsRegular() { return 0, errIsNotRegular } if verifier == nil { n, err = file.ReadAt(buffer, offset) return int64(n), err } h := verifier.algorithm.New() if _, err = io.Copy(h, io.LimitReader(file, offset)); err != nil { return 0, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 26 09:58:27 UTC 2024 - 91.3K bytes - Viewed (0)