- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 33 for ReadFull (0.07 sec)
-
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) -
cmd/erasure_test.go
{dataBlocks: 8, parityBlocks: 4, missingData: 2, missingParity: 2, reconstructParity: false, shouldFail: false}, } func TestErasureEncodeDecode(t *testing.T) { data := make([]byte, 256) if _, err := io.ReadFull(rand.Reader, data); err != nil { t.Fatalf("Failed to read random data: %v", err) } for i, test := range erasureEncodeDecodeTests { buffer := make([]byte, len(data), 2*len(data)) copy(buffer, data)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 25 19:37:26 UTC 2022 - 4.8K bytes - Viewed (0) -
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) -
cmd/bitrot.go
return errFileCorrupt } bufp := xioutil.ODirectPoolSmall.Get().(*[]byte) defer xioutil.ODirectPoolSmall.Put(bufp) for left > 0 { // Read expected hash... h.Reset() n, err := io.ReadFull(r, hashBuf) if err != nil { // Read's failed for object with right size, file is corrupt. return err } // Subtract hash length.. left -= int64(n) if left < shardSize { shardSize = left
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.6K 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/tar/reader.go
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 } if bytes.Equal(tr.blk[:], zeroBlock[:]) { if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil { return nil, nil, err // EOF is okay here; exactly 1 block of zeros read }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Mar 08 01:59:14 UTC 2024 - 26.8K bytes - Viewed (0) -
cmd/erasure-heal_test.go
if err != nil { t.Fatalf("Test %d: failed to create ErasureStorage: %v", i, err) } data := make([]byte, test.size) if _, err = io.ReadFull(rand.Reader, data); err != nil { t.Fatalf("Test %d: failed to create random test data: %v", i, err) } buffer := make([]byte, test.blocksize, 2*test.blocksize) writers := make([]io.Writer, len(disks))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.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/erasure-encode_test.go
if err != nil { t.Fatalf("Test %d: failed to create ErasureStorage: %v", i, err) } buffer := make([]byte, test.blocksize, 2*test.blocksize) data := make([]byte, test.data) if _, err = io.ReadFull(rand.Reader, data); err != nil { t.Fatalf("Test %d: failed to generate random test data: %v", i, err) } writers := make([]io.Writer, len(disks)) for i, disk := range disks { if disk == OfflineDisk {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 11.9K bytes - Viewed (0)