Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for zeros (0.13 sec)

  1. src/archive/zip/zip_test.go

    			got := string(readBuf[:n])
    			if err != nil || got != want {
    				t.Errorf("off %d, size %d = %v, %v (%q); want %q", off, size, n, err, got, want)
    			}
    		}
    	}
    
    }
    
    type zeros struct{}
    
    func (zeros) Read(p []byte) (int, error) {
    	clear(p)
    	return len(p), nil
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 19.5K bytes
    - Viewed (0)
  2. src/archive/tar/reader.go

    		if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil {
    			return nil, nil, err // EOF is okay here; exactly 1 block of zeros read
    		}
    		if bytes.Equal(tr.blk[:], zeroBlock[:]) {
    			return nil, nil, io.EOF // normal EOF; exactly 2 block of zeros read
    		}
    		return nil, nil, ErrHeader // Zero block and then non-zero block
    	}
    
    	// Verify the header matches a known format.
    	format := tr.blk.getFormat()
    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)
  3. src/archive/tar/format.go

    			c = ' ' // Treat the checksum field itself as all spaces.
    		}
    		unsigned += int64(c)
    		signed += int64(int8(c))
    	}
    	return unsigned, signed
    }
    
    // reset clears the block with all zeros.
    func (b *block) reset() {
    	*b = block{}
    }
    
    type headerV7 [blockSize]byte
    
    func (h *headerV7) name() []byte     { return h[000:][:100] }
    func (h *headerV7) mode() []byte     { return h[100:][:8] }
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  4. doc/asm.html

    </p>
    
    <p>
    The <code>GLOBL</code> directive declares a symbol to be global.
    The arguments are optional flags and the size of the data being declared as a global,
    which will have initial value all zeros unless a <code>DATA</code> directive
    has initialized it.
    The <code>GLOBL</code> directive must follow any corresponding <code>DATA</code> directives.
    </p>
    
    <p>
    For example,
    </p>
    
    <pre>
    HTML
    - Registered: Tue May 07 11:14:38 GMT 2024
    - Last Modified: Tue Nov 28 19:15:27 GMT 2023
    - 36.3K bytes
    - Viewed (0)
  5. src/cmd/cgo/doc.go

    C's union types are represented as a Go byte array with the same length.
    
    Go structs cannot embed fields with C types.
    
    Go code cannot refer to zero-sized fields that occur at the end of
    non-empty C structs. To get the address of such a field (which is the
    only operation you can do with a zero-sized field) you must take the
    address of the struct and add the size of the struct.
    
    Cgo translates C types into equivalent unexported Go types.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  6. src/bytes/buffer.go

    	"unicode/utf8"
    )
    
    // smallBufferSize is an initial allocation minimal capacity.
    const smallBufferSize = 64
    
    // A Buffer is a variable-sized buffer of bytes with [Buffer.Read] and [Buffer.Write] methods.
    // The zero value for Buffer is an empty buffer ready to use.
    type Buffer struct {
    	buf      []byte // contents are the bytes buf[off : len(buf)]
    	off      int    // read at &buf[off], write at &buf[len(buf)]
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  7. src/archive/tar/common.go

    // having zero bytes. As such, the encoding and decoding logic in this package
    // deals with sparseDatas.
    //
    // However, the external API uses sparseHoles instead of sparseDatas because the
    // zero value of sparseHoles logically represents a normal file (i.e., there are
    // no holes in it). On the other hand, the zero value of sparseDatas implies
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24.7K bytes
    - Viewed (2)
  8. src/archive/zip/writer_test.go

    		t.Errorf("unexpected method and flags: %v", b[6:10])
    	}
    
    	if !bytes.Equal(b[14:26], make([]byte, 12)) { // FileHeader.{CRC32,CompressSize,UncompressedSize} all zero.
    		t.Errorf("unexpected crc, compress and uncompressed size to be 0 was: %v", b[14:26])
    	}
    
    	binary.LittleEndian.PutUint32(sig[:], uint32(dataDescriptorSignature))
    	if bytes.Contains(b, sig[:]) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
  9. src/archive/tar/reader_test.go

    			Uid:      010000000,
    			ModTime:  time.Unix(0, 0),
    			Typeflag: '0',
    		}},
    	}, {
    		// USTAR archive with a regular entry with non-zero device numbers.
    		file: "testdata/ustar-file-devs.tar",
    		headers: []*Header{{
    			Name:     "file",
    			Mode:     0644,
    			Typeflag: '0',
    			ModTime:  time.Unix(0, 0),
    			Devmajor: 1,
    			Devminor: 1,
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
  10. src/archive/zip/reader.go

    	bodyOffset, err := f.findBodyOffset()
    	if err != nil {
    		return nil, err
    	}
    	if strings.HasSuffix(f.Name, "/") {
    		// The ZIP specification (APPNOTE.TXT) specifies that directories, which
    		// are technically zero-byte files, must not have any associated file
    		// data. We previously tried failing here if f.CompressedSize64 != 0,
    		// but it turns out that a number of implementations (namely, the Java
    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