Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 91 for newWriter (0.12 sec)

  1. cmd/data-usage-cache.go

    	_, err := dst.Write([]byte{dataUsageCacheVerCurrent})
    	if err != nil {
    		return err
    	}
    	enc, err := zstd.NewWriter(dst,
    		zstd.WithEncoderLevel(zstd.SpeedFastest),
    		zstd.WithWindowSize(1<<20),
    		zstd.WithEncoderConcurrency(2))
    	if err != nil {
    		return err
    	}
    	mEnc := msgp.NewWriter(enc)
    	err = d.EncodeMsg(mEnc)
    	if err != nil {
    		return err
    	}
    	err = mEnc.Flush()
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  2. cmd/storage-rest-client.go

    		return errs
    	}
    
    	values := make(url.Values)
    	values.Set(storageRESTVolume, volume)
    	values.Set(storageRESTTotalVersions, strconv.Itoa(len(versions)))
    
    	var buffer bytes.Buffer
    	encoder := msgp.NewWriter(&buffer)
    	for _, version := range versions {
    		version.EncodeMsg(encoder)
    	}
    	storageLogIf(ctx, encoder.Flush())
    
    	errs = make([]error, len(versions))
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:07:21 UTC 2024
    - 30.2K bytes
    - Viewed (0)
  3. cmd/update.go

    	b := bytebufferpool.Get()
    	bc := bytebufferpool.Get()
    	defer func() {
    		b.Reset()
    		bc.Reset()
    
    		bytebufferpool.Put(b)
    		bytebufferpool.Put(bc)
    	}()
    
    	w, err := zstd.NewWriter(bc)
    	if err != nil {
    		return nil, nil, err
    	}
    
    	if _, err = io.Copy(w, io.TeeReader(reader, b)); err != nil {
    		return nil, nil, err
    	}
    
    	w.Close()
    	return bc.Bytes(), b.Bytes(), nil
    }
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  4. internal/s3select/select.go

    	},
    }
    
    var bufioWriterPool = sync.Pool{
    	New: func() interface{} {
    		// io.Discard is just used to create the writer. Actual destination
    		// writer is set later by Reset() before using it.
    		return bufio.NewWriter(xioutil.Discard)
    	},
    }
    
    // UnmarshalXML - decodes XML data.
    func (c *CompressionType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
    	var s string
    	if err := d.DecodeElement(&s, &start); err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 22 00:33:43 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  5. src/archive/tar/reader_test.go

    func TestInsecurePaths(t *testing.T) {
    	t.Setenv("GODEBUG", "tarinsecurepath=0")
    	for _, path := range []string{
    		"../foo",
    		"/foo",
    		"a/b/../../../c",
    	} {
    		var buf bytes.Buffer
    		tw := NewWriter(&buf)
    		tw.WriteHeader(&Header{
    			Name: path,
    		})
    		const securePath = "secure"
    		tw.WriteHeader(&Header{
    			Name: securePath,
    		})
    		tw.Close()
    
    		tr := NewReader(&buf)
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 03 15:48:09 UTC 2024
    - 46.9K bytes
    - Viewed (0)
  6. cmd/object-api-utils_test.go

    				if index.TotalUncompressed != int64(len(tt.data)) {
    					t.Errorf("Expected size %d, got %d", len(tt.data), index.TotalUncompressed)
    				}
    			}
    			var stdBuf bytes.Buffer
    			w := s2.NewWriter(&stdBuf)
    			_, err = io.CopyBuffer(w, bytes.NewReader(tt.data), buf)
    			if err != nil {
    				t.Fatal(err)
    			}
    			err = w.Close()
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			var (
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  7. cmd/admin-bucket-handlers.go

    			writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    			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) {
    		header, zerr := zip.FileInfoHeader(dummyFileInfo{
    			name:    filename,
    			size:    int64(sz),
    			mode:    0o600,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 28 15:32:18 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/Files.java

       * @param charset the charset used to encode the output stream; see {@link StandardCharsets} for
       *     helpful predefined constants
       * @return the buffered writer
       */
      public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException {
        checkNotNull(file);
        checkNotNull(charset);
        return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset));
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jul 22 19:03:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  9. guava/src/com/google/common/io/Files.java

       * @param charset the charset used to encode the output stream; see {@link StandardCharsets} for
       *     helpful predefined constants
       * @return the buffered writer
       */
      public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException {
        checkNotNull(file);
        checkNotNull(charset);
        return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset));
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jul 22 19:03:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  10. src/cmd/api/main_test.go

    			continue
    		}
    		comma := strings.Index(f, ",")
    		for cname := range cmap {
    			f2 := fmt.Sprintf("%s (%s)%s", f[:comma], cname, f[comma:])
    			features = append(features, f2)
    		}
    	}
    
    	bw := bufio.NewWriter(os.Stdout)
    	defer bw.Flush()
    
    	var required []string
    	for _, file := range checkFiles {
    		required = append(required, fileFeatures(file, needApproval(file))...)
    	}
    	for _, file := range nextFiles {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Sep 04 18:16:59 UTC 2024
    - 31.4K bytes
    - Viewed (0)
Back to top