Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for formatOctal (0.06 sec)

  1. src/archive/tar/strconv.go

    func (f *formatter) formatNumeric(b []byte, x int64) {
    	if fitsInOctal(len(b), x) {
    		f.formatOctal(b, x)
    		return
    	}
    
    	if fitsInBase256(len(b), x) {
    		for i := len(b) - 1; i >= 0; i-- {
    			b[i] = byte(x)
    			x >>= 8
    		}
    		b[0] |= 0x80 // Highest bit indicates binary format
    		return
    	}
    
    	f.formatOctal(b, 0) // Last resort, just write zero
    	f.err = ErrFieldTooLong
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Aug 01 14:28:42 UTC 2023
    - 9K bytes
    - Viewed (0)
  2. src/archive/tar/writer.go

    	var f formatter
    	v7 := tw.blk.toV7()
    	v7.typeFlag()[0] = flag
    	f.formatString(v7.name(), name)
    	f.formatOctal(v7.mode(), 0)
    	f.formatOctal(v7.uid(), 0)
    	f.formatOctal(v7.gid(), 0)
    	f.formatOctal(v7.size(), int64(len(data))) // Must be < 8GiB
    	f.formatOctal(v7.modTime(), 0)
    	tw.blk.setFormat(format)
    	if f.err != nil {
    		return f.err // Only occurs if size condition is violated
    	}
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 14:22:59 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  3. src/archive/tar/format.go

    	// Update checksum.
    	// This field is special in that it is terminated by a NULL then space.
    	var f formatter
    	field := b.toV7().chksum()
    	chksum, _ := b.computeChecksum() // Possible values are 256..128776
    	f.formatOctal(field[:7], chksum) // Never fails since 128776 < 262143
    	field[7] = ' '
    }
    
    // computeChecksum computes the checksum for the header block.
    // POSIX specifies a sum of the unsigned byte values, but the Sun tar used
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Oct 13 18:36:46 UTC 2023
    - 11.3K bytes
    - Viewed (0)
Back to top