- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for newWriter (0.06 sec)
-
cmd/storage-datatypes_gen_test.go
if err != nil { t.Error(err) } } func BenchmarkEncodeBaseOptions(b *testing.B) { v := BaseOptions{} var buf bytes.Buffer msgp.Encode(&buf, &v) b.SetBytes(int64(buf.Len())) en := msgp.NewWriter(msgp.Nowhere) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { v.EncodeMsg(en) } en.Flush() } func BenchmarkDecodeBaseOptions(b *testing.B) { v := BaseOptions{}
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Aug 12 08:38:15 UTC 2024 - 73.9K bytes - Viewed (0) -
src/bufio/bufio_test.go
dstBuf := new(bytes.Buffer) dst := NewWriter(dstBuf) for i := 0; i < b.N; i++ { srcBuf.Reset() dstBuf.Reset() dst.Reset(dstBuf) io.Copy(dst, src) } } func BenchmarkWriterCopyUnoptimal(b *testing.B) { srcBuf := bytes.NewBuffer(make([]byte, 8192)) src := onlyReader{srcBuf} dstBuf := new(bytes.Buffer) dst := NewWriter(onlyWriter{dstBuf}) for i := 0; i < b.N; i++ {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0) -
src/archive/zip/reader_test.go
// if err := os.WriteFile("/tmp/biggest.zip", biggestZip, 0666); err != nil { // log.Fatal(err) // } // } // // func makeZip(name string, r io.Reader) []byte { // var buf bytes.Buffer // w := zip.NewWriter(&buf) // wf, err := w.Create(name) // if err != nil { // log.Fatal(err) // } // if _, err = io.Copy(wf, r); err != nil { // log.Fatal(err) // } // if err := w.Close(); err != nil {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 55.6K bytes - Viewed (0) -
cmd/admin-handlers-users.go
objectAPI, _ := validateAdminReq(ctx, w, r, policy.ExportIAMAction) if objectAPI == nil { return } // Initialize a zip writer which will provide a zipped content // of bucket metadata zipWriter := zip.NewWriter(w) defer zipWriter.Close() rawDataFn := func(r io.Reader, filename string, sz int) error { header, zerr := zip.FileInfoHeader(dummyFileInfo{ name: filename, size: int64(sz), mode: 0o600,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 03 23:11:02 UTC 2024 - 85.1K bytes - Viewed (0) -
cmd/sts-handlers_test.go
`, } exportContent := map[string][]byte{} for k, v := range exportContentStrings { exportContent[k] = []byte(v) } var importContent []byte { var b bytes.Buffer zipWriter := zip.NewWriter(&b) rawDataFn := func(r io.Reader, filename string, sz int) error { header, zerr := zip.FileInfoHeader(dummyFileInfo{ name: filename, size: int64(sz), mode: 0o600, modTime: time.Now(),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 10 23:40:37 UTC 2024 - 97.1K bytes - Viewed (0)