- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for zeros (5 sec)
-
src/archive/zip/reader_test.go
// // import ( // "archive/zip" // "bytes" // "io" // "log" // "os" // ) // // type zeros struct{} // // func (zeros) Read(b []byte) (int, error) { // clear(b) // return len(b), nil // } // // func main() { // bigZip := makeZip("big.file", io.LimitReader(zeros{}, 1<<32-1)) // if err := os.WriteFile("/tmp/big.zip", bigZip, 0666); err != nil { // log.Fatal(err) // } //
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 55.3K bytes - Viewed (0) -
src/archive/zip/zip_test.go
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) -
src/archive/tar/strconv.go
} return int64(x) } func (f *formatter) formatOctal(b []byte, x int64) { if !fitsInOctal(len(b), x) { x = 0 // Last resort, just write zero f.err = ErrFieldTooLong } s := strconv.FormatInt(x, 8) // Add leading zeros, but leave room for a NUL. if n := len(b) - len(s) - 1; n > 0 { s = strings.Repeat("0", n) + s } f.formatString(b, s) }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 01 14:28:42 GMT 2023 - 9K bytes - Viewed (0) -
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) -
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) -
doc/go1.17_spec.html
<code>T</code> is a floating-point type and <code>x</code> can be rounded to <code>T</code>'s precision without overflow. Rounding uses IEEE 754 round-to-even rules but with an IEEE negative zero further simplified to an unsigned zero. Note that constant values never result in an IEEE negative zero, NaN, or infinity. </li> <li> <code>T</code> is a complex type, and <code>x</code>'s
HTML - Registered: Tue May 07 11:14:38 GMT 2024 - Last Modified: Thu Apr 11 20:22:45 GMT 2024 - 211.6K bytes - Viewed (0) -
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) -
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) -
src/bytes/bytes_test.go
t.Errorf("Equal(%d, %d, %d) = false", len, x, y) } } } } } // make sure Equal returns false for minimally different strings. The data // is all zeros except for a single one in one location. func TestNotEqual(t *testing.T) { var size = 128 if testing.Short() { size = 32 } a := make([]byte, size) b := make([]byte, size)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Wed Jan 24 16:07:25 GMT 2024 - 56.2K bytes - Viewed (0) -
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)