- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for ReadFull (0.06 sec)
-
cmd/bitrot-streaming.go
} } if offset != b.currOffset { // Can never happen unless there are programmer bugs return 0, errUnexpected } b.h.Reset() _, err = io.ReadFull(b.rc, b.hashBytes) if err != nil { return 0, err } _, err = io.ReadFull(b.rc, buf) if err != nil { return 0, err } b.h.Write(buf) if !bytes.Equal(b.h.Sum(nil), b.hashBytes) { return 0, errFileCorrupt }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 12:20:54 UTC 2024 - 6K bytes - Viewed (0) -
cmd/dummy-data-generator_test.go
// also returned. func cmpReaders(r1, r2 io.Reader) (bool, string) { bufLen := 32 * 1024 b1, b2 := make([]byte, bufLen), make([]byte, bufLen) for i := 0; true; i++ { n1, e1 := io.ReadFull(r1, b1) n2, e2 := io.ReadFull(r2, b2) if n1 != n2 { return false, fmt.Sprintf("Read %d != %d bytes from the readers", n1, n2) } if !bytes.Equal(b1[:n1], b2[:n2]) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 02 15:13:05 UTC 2024 - 4.7K bytes - Viewed (0) -
internal/s3select/json/preader.go
if cap(dst) < skip { dst = make([]byte, 0, skip+1024) } dst = dst[:skip] if skip > 0 { n, err := io.ReadFull(r.buf, dst) if err != nil && err != io.ErrUnexpectedEOF { // If an EOF happens after reading some but not all the bytes, // ReadFull returns ErrUnexpectedEOF. return dst[:n], err } dst = dst[:n] if err == io.ErrUnexpectedEOF { return dst, io.EOF } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 6.5K bytes - Viewed (0) -
cmd/untar.go
asyncWriters <- struct{}{} b := poolBuf128k.Get().([]byte) if cap(b) < int(header.Size) { b = make([]byte, smallFileThreshold) } b = b[:header.Size] if _, err := io.ReadFull(tarReader, b); err != nil { return err } wg.Add(1) go func(name string, fi fs.FileInfo, b []byte) { rc := disconnectReader{r: bytes.NewReader(b)} defer func() { rc.Close()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 22 00:33:43 UTC 2024 - 6K bytes - Viewed (2) -
internal/auth/credentials.go
} if length <= 0 { length = accessKeyMaxLen } if length < accessKeyMinLen { return "", errors.New("auth: access key length is too short") } key := make([]byte, length) if _, err := io.ReadFull(random, key); err != nil { return "", err } for i := range key { key[i] = alphaNumericTable[key[i]%alphaNumericTableLen] } return string(key), nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue May 28 17:14:16 UTC 2024 - 12K bytes - Viewed (0) -
src/archive/zip/reader.go
// 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 } b := readBuf(buf[:12])
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0) -
src/archive/tar/reader_test.go
t.Fatalf("entry %d, Next(): got %v, want %v", i, err, nil) } buf := make([]byte, tc.cnt) if _, err := io.ReadFull(tr, buf); err != nil { t.Fatalf("entry %d, ReadFull(): got %v, want %v", i, err, nil) } if string(buf) != tc.output { t.Fatalf("entry %d, ReadFull(): got %q, want %q", i, string(buf), tc.output) } } if _, err := tr.Next(); err != io.EOF {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 03 15:48:09 UTC 2024 - 46.9K bytes - Viewed (0) -
src/archive/zip/zip_test.go
if err != nil { t.Fatal("opening:", err) } rc.(*checksumReader).hash = fakeHash32{} for i := 0; i < chunks; i++ { _, err := io.ReadFull(rc, chunk) if err != nil { t.Fatal("read:", err) } } if frag := int(size % chunkSize); frag > 0 { _, err := io.ReadFull(rc, chunk[:frag]) if err != nil { t.Fatal("read:", err) } } gotEnd, err := io.ReadAll(rc) if err != nil {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.6K bytes - Viewed (0) -
cmd/storage-rest-server.go
if !s.IsValid(w, r) { return } volume := r.Form.Get(storageRESTVolume) filePath := r.Form.Get(storageRESTFilePath) buf := make([]byte, r.ContentLength) _, err := io.ReadFull(r.Body, buf) if err != nil { s.writeErrorResponse(w, err) return } err = s.getStorage().AppendFile(r.Context(), volume, filePath, buf) if err != nil { s.writeErrorResponse(w, err) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 45.7K bytes - Viewed (0) -
internal/ioutil/ioutil.go
var written int64 for { buf := alignedBuf if totalSize > 0 { remaining := totalSize - written if remaining < int64(len(buf)) { buf = buf[:remaining] } } nr, err := io.ReadFull(r, buf) eof := errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) if err != nil && !eof { return written, err } buf = buf[:nr] var ( n int un int nw int64
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 10.9K bytes - Viewed (0)