Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for read_all (0.2 sec)

  1. src/archive/tar/reader.go

    		n += nn
    	}
    	if len(b) == n && err == io.EOF {
    		err = nil
    	}
    	return n, err
    }
    
    // readSpecialFile is like io.ReadAll except it returns
    // ErrFieldTooLong if more than maxSpecialFileSize is read.
    func readSpecialFile(r io.Reader) ([]byte, error) {
    	buf, err := io.ReadAll(io.LimitReader(r, maxSpecialFileSize+1))
    	if len(buf) > maxSpecialFileSize {
    		return nil, ErrFieldTooLong
    	}
    	return buf, err
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  2. internal/s3select/csv/reader.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
    		}
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 8.9K bytes
    - Viewed (0)
  3. 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])
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
Back to top