- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for newS2CompressReader (0.23 sec)
-
cmd/object-api-utils.go
func init() { if runtime.GOARCH == "amd64" { // On amd64 we have assembly and can use stronger compression. compressOpts = append(compressOpts, s2.WriterBetterCompression()) } } // newS2CompressReader will read data from r, compress it and return the compressed data as a Reader. // Use Close to ensure resources are released on incomplete streams. // // input 'on' is always recommended such that this function works
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0) -
cmd/object-multipart-handlers.go
// Compress only if the compression is enabled during initial multipart. var idxCb func() []byte if isCompressed { wantEncryption := crypto.Requested(r.Header) || isEncrypted s2c, cb := newS2CompressReader(reader, actualPartSize, wantEncryption) idxCb = cb defer s2c.Close() reader = etag.Wrap(s2c, reader) length = -1 }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Aug 31 18:25:48 UTC 2024 - 39.2K bytes - Viewed (0) -
cmd/object-api-utils_test.go
} for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { buf := make([]byte, 100) // make small buffer to ensure multiple reads are required for large case r, idxCB := newS2CompressReader(bytes.NewReader(tt.data), int64(len(tt.data)), false) defer r.Close() var rdrBuf bytes.Buffer _, err := io.CopyBuffer(&rdrBuf, r, buf) if err != nil { t.Fatal(err) } r.Close()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 24.1K bytes - Viewed (0) -
cmd/object-handlers.go
compressMetadata[ReservedMetadataPrefix+"actual-size"] = strconv.FormatInt(actualSize, 10) reader = etag.NewReader(ctx, reader, nil, nil) wantEncryption := crypto.Requested(r.Header) s2c, cb := newS2CompressReader(reader, actualSize, wantEncryption) dstOpts.IndexCB = cb defer s2c.Close() reader = etag.Wrap(s2c, reader) length = -1 } else {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Oct 05 05:16:15 UTC 2024 - 117.4K bytes - Viewed (0)