Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for IsCompressed (0.2 sec)

  1. cmd/storage-datatypes.go

    	typ1, ok1 := crypto.IsEncrypted(fi.Metadata)
    	typ2, ok2 := crypto.IsEncrypted(ofi.Metadata)
    	if ok1 != ok2 {
    		return false
    	}
    	if typ1 != typ2 {
    		return false
    	}
    	if fi.IsCompressed() != ofi.IsCompressed() {
    		return false
    	}
    	if !fi.TransitionInfoEquals(ofi) {
    		return false
    	}
    	if !fi.ModTime.Equal(ofi.ModTime) {
    		return false
    	}
    	return fi.Erasure.Equal(ofi.Erasure)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  2. cmd/object-api-utils.go

    		cancel()
    		if err != nil {
    			retry++
    			continue
    		}
    		conn.Close()
    		break
    	}
    
    	return host
    }
    
    // IsCompressed returns true if the object is marked as compressed.
    func (o *ObjectInfo) IsCompressed() bool {
    	_, ok := o.UserDefined[ReservedMetadataPrefix+"compression"]
    	return ok
    }
    
    // IsCompressedOK returns whether the object is compressed and can be decompressed.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  3. cmd/object-api-utils_test.go

    				},
    			},
    			result: false,
    		},
    	}
    	for i, test := range testCases {
    		t.Run(strconv.Itoa(i), func(t *testing.T) {
    			got := test.objInfo.IsCompressed()
    			if got != test.result {
    				t.Errorf("IsCompressed: Expected %v but received %v",
    					test.result, got)
    			}
    			got, gErr := test.objInfo.IsCompressedOK()
    			if got != test.result {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 24.1K bytes
    - Viewed (0)
  4. cmd/object-multipart-handlers.go

    	// Read compression metadata preserved in the init multipart for the decision.
    	_, isCompressed := mi.UserDefined[ReservedMetadataPrefix+"compression"]
    	// 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)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 31 18:25:48 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  5. cmd/erasure-metadata.go

    			// If metadata says encrypted, ask for it in quorum.
    			if etyp, ok := crypto.IsEncrypted(meta.Metadata); ok {
    				fmt.Fprint(h, etyp)
    			}
    
    			// If compressed, look for compressed FileInfo only
    			if meta.IsCompressed() {
    				fmt.Fprint(h, meta.Metadata[ReservedMetadataPrefix+"compression"])
    			}
    
    			metaHashes[i] = hex.EncodeToString(h.Sum(nil))
    			h.Reset()
    		}
    	}
    
    	metaHashCountMap := make(map[string]int)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 22:10:24 UTC 2024
    - 21.3K bytes
    - Viewed (0)
  6. cmd/erasure-multipart.go

    	var index []byte
    	if opts.IndexCB != nil {
    		index = opts.IndexCB()
    	}
    
    	actualSize := data.ActualSize()
    	if actualSize < 0 {
    		_, encrypted := crypto.IsEncrypted(fi.Metadata)
    		compressed := fi.IsCompressed()
    		switch {
    		case compressed:
    			// ... nothing changes for compressed stream.
    			// if actualSize is -1 we have no known way to
    			// determine what is the actualSize.
    		case encrypted:
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 44.7K bytes
    - Viewed (0)
Back to top