Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for fwrite (0.16 sec)

  1. src/bytes/reader.go

    	return abs, nil
    }
    
    // WriteTo implements the [io.WriterTo] interface.
    func (r *Reader) WriteTo(w io.Writer) (n int64, err error) {
    	r.prevRune = -1
    	if r.i >= int64(len(r.s)) {
    		return 0, nil
    	}
    	b := r.s[r.i:]
    	m, err := w.Write(b)
    	if m > len(b) {
    		panic("bytes.Reader.WriteTo: invalid Write count")
    	}
    	r.i += int64(m)
    	n = int64(m)
    	if m != len(b) && err == nil {
    		err = io.ErrShortWrite
    	}
    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)
  2. src/archive/tar/reader.go

    			sr.sp = sr.sp[1:] // Ensure last fragment always remains
    		}
    	}
    
    	// If the last fragment is a hole, then seek to 1-byte before EOF, and
    	// write a single byte to ensure the file is the right size.
    	if writeLastByte && err == nil {
    		_, err = ws.Write([]byte{0})
    		sr.pos++
    	}
    
    	n = sr.pos - pos0
    	switch {
    	case err == io.EOF:
    		return n, errMissData // Less data in dense file than sparse file
    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)
  3. 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
    }
    
    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)
  4. internal/hash/reader.go

    	}
    	return nil
    }
    
    func (r *Reader) Read(p []byte) (int, error) {
    	n, err := r.src.Read(p)
    	r.bytesRead += int64(n)
    	if r.sha256 != nil {
    		r.sha256.Write(p[:n])
    	}
    	if r.contentHasher != nil {
    		r.contentHasher.Write(p[:n])
    	}
    
    	if err == io.EOF { // Verify content SHA256, if set.
    		if r.expectedMin > 0 {
    			if r.bytesRead < r.expectedMin {
    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)
  5. src/archive/zip/reader.go

    	return headerFileInfo{&r.f.FileHeader}, nil
    }
    
    func (r *checksumReader) Read(b []byte) (n int, err error) {
    	if r.err != nil {
    		return 0, r.err
    	}
    	n, err = r.rc.Read(b)
    	r.hash.Write(b[:n])
    	r.nread += uint64(n)
    	if r.nread > r.f.UncompressedSize64 {
    		return 0, ErrFormat
    	}
    	if err == nil {
    		return
    	}
    	if err == io.EOF {
    		if r.nread != r.f.UncompressedSize64 {
    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)
Back to top