- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for Reset (0.34 sec)
-
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) -
src/bytes/reader.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 17:10:31 GMT 2023 - 3.9K bytes - Viewed (1) -
src/cmd/cgo/godefs.go
conf.Fprint(&buf, fset, f.AST) return buf.String() } var gofmtBuf strings.Builder // gofmt returns the gofmt-formatted string for an AST node. func gofmt(n interface{}) string { gofmtBuf.Reset() err := printer.Fprint(&gofmtBuf, fset, n) if err != nil { return "<" + err.Error() + ">" } return gofmtBuf.String() } // gofmtLineReplacer is used to put a gofmt-formatted string for an
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Thu Sep 08 14:33:35 GMT 2022 - 4.5K bytes - Viewed (0) -
src/bufio/bufio_test.go
t.Errorf("buf = %q; want foo", buf) } r.Reset(strings.NewReader("bar bar")) checkAll(r, "bar bar") *r = Reader{} // zero out the Reader r.Reset(strings.NewReader("bar bar")) checkAll(r, "bar bar") // Wrap a reader and then Reset to that reader. r.Reset(strings.NewReader("recur")) r2 := NewReader(r) checkAll(r2, "recur") r.Reset(strings.NewReader("recur2")) r2.Reset(r)
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
src/archive/tar/writer.go
realSize := hdr.Size hdr.Size = 0 // Encoded size; does not account for encoded sparse map for _, s := range spd { hdr.Size += s.Length } copy(blk.V7().Size(), zeroBlock[:]) // Reset field f.formatNumeric(blk.V7().Size(), hdr.Size) f.formatNumeric(blk.GNU().RealSize(), realSize) } */ blk.setFormat(FormatGNU) if err := tw.writeRawHeader(blk, hdr.Size, hdr.Typeflag); err != nil {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 19.6K bytes - Viewed (0) -
src/bytes/buffer.go
func (b *Buffer) Truncate(n int) { if n == 0 { b.Reset() return } b.lastRead = opInvalid if n < 0 || n > b.Len() { panic("bytes.Buffer: truncation out of range") } b.buf = b.buf[:b.off+n] } // Reset resets the buffer to be empty, // but it retains the underlying storage for use by future writes. // Reset is the same as [Buffer.Truncate](0). func (b *Buffer) Reset() { b.buf = b.buf[:0] b.off = 0
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) -
src/bytes/buffer_test.go
buf := NewBuffer(make([]byte, n)) for i := 0; i < b.N; i++ { buf.Reset() for i := 0; i < n; i++ { buf.WriteByte('x') } } } func BenchmarkWriteRune(b *testing.B) { const n = 4 << 10 const r = '☺' b.SetBytes(int64(n * utf8.RuneLen(r))) buf := NewBuffer(make([]byte, n*utf8.UTFMax)) for i := 0; i < b.N; i++ { buf.Reset() for i := 0; i < n; i++ { buf.WriteRune(r) } } }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Apr 26 13:31:36 GMT 2024 - 18.6K bytes - Viewed (0) -
src/archive/zip/register.go
type Decompressor func(r io.Reader) io.ReadCloser var flateWriterPool sync.Pool func newFlateWriter(w io.Writer) io.WriteCloser { fw, ok := flateWriterPool.Get().(*flate.Writer) if ok { fw.Reset(w) } else { fw, _ = flate.NewWriter(w, 5) } return &pooledFlateWriter{fw: fw} } type pooledFlateWriter struct { mu sync.Mutex // guards Close and Write fw *flate.Writer }
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 3.7K bytes - Viewed (0) -
src/cmd/asm/internal/asm/pseudo_test.go
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Tue Aug 29 07:48:38 GMT 2023 - 3.1K bytes - Viewed (0) -
src/archive/zip/writer_test.go
runOnce := func(buf *bytes.Buffer) { buf.Reset() zw := NewWriter(buf) for j := 0; j < 3; j++ { w, _ := zw.CreateHeader(&FileHeader{ Name: "foo", Method: Deflate, }) w.Write(bigBuf) } zw.Close() } b.ReportAllocs() // Run once and then reset the timer. // This effectively discards the very large initial flate setup cost,
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)