Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 181 for encoded (0.17 sec)

  1. cmd/erasure_test.go

    			t.Fatalf("Test %d: failed to create erasure: %v", i, err)
    		}
    		encoded, err := erasure.EncodeData(context.Background(), buffer)
    		if err != nil {
    			t.Fatalf("Test %d: failed to encode data: %v", i, err)
    		}
    
    		for j := range encoded[:test.missingData] {
    			encoded[j] = nil
    		}
    		for j := test.dataBlocks; j < test.dataBlocks+test.missingParity; j++ {
    			encoded[j] = nil
    		}
    
    		if test.reconstructParity {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jul 25 19:37:26 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  2. internal/hash/reader.go

    		if r.contentHasher != nil {
    			if r.contentHash.Type.Trailing() {
    				var err error
    				r.contentHash.Encoded = r.trailer.Get(r.contentHash.Type.Key())
    				r.contentHash.Raw, err = base64.StdEncoding.DecodeString(r.contentHash.Encoded)
    				if err != nil || len(r.contentHash.Raw) == 0 {
    					return 0, ChecksumMismatch{Got: r.contentHash.Encoded}
    				}
    			}
    			if sum := r.contentHasher.Sum(nil); !bytes.Equal(r.contentHash.Raw, sum) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.8K bytes
    - Viewed (0)
  3. internal/hash/checksum.go

    	ChecksumIncludesMultipart
    
    	// ChecksumNone indicates no checksum.
    	ChecksumNone ChecksumType = 0
    )
    
    // Checksum is a type and base 64 encoded value.
    type Checksum struct {
    	Type    ChecksumType
    	Encoded string
    	Raw     []byte
    }
    
    // Is returns if c is all of t.
    func (c ChecksumType) Is(t ChecksumType) bool {
    	if t == ChecksumNone {
    		return c == ChecksumNone
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  4. src/bufio/scan.go

    // ScanRunes is a split function for a [Scanner] that returns each
    // UTF-8-encoded rune as a token. The sequence of runes returned is
    // equivalent to that from a range loop over the input as a string, which
    // means that erroneous UTF-8 encodings translate to U+FFFD = "\xef\xbf\xbd".
    // Because of the Scan interface, this makes it impossible for the client to
    // distinguish correctly encoded replacement runes from encoding errors.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  5. src/bytes/bytes.go

    // ContainsAny reports whether any of the UTF-8-encoded code points in chars are within b.
    func ContainsAny(b []byte, chars string) bool {
    	return IndexAny(b, chars) >= 0
    }
    
    // ContainsRune reports whether the rune is contained in the UTF-8-encoded byte slice b.
    func ContainsRune(b []byte, r rune) bool {
    	return IndexRune(b, r) >= 0
    }
    
    // ContainsFunc reports whether any of the UTF-8-encoded code points r within b satisfy f(r).
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  6. src/archive/zip/struct.go

    	// always emitted. The legacy MS-DOS date field is encoded according to the
    	// location of the Modified time.
    	Modified time.Time
    
    	// ModifiedTime is an MS-DOS-encoded time.
    	//
    	// Deprecated: Use Modified instead.
    	ModifiedTime uint16
    
    	// ModifiedDate is an MS-DOS-encoded date.
    	//
    	// Deprecated: Use Modified instead.
    	ModifiedDate uint16
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 12.1K bytes
    - Viewed (0)
  7. cmd/erasure-utils.go

    )
    
    // getDataBlockLen - get length of data blocks from encoded blocks.
    func getDataBlockLen(enBlocks [][]byte, dataBlocks int) int {
    	size := 0
    	// Figure out the data block length.
    	for _, block := range enBlocks[:dataBlocks] {
    		size += len(block)
    	}
    	return size
    }
    
    // Writes all the data blocks from encoded blocks until requested
    // outSize length. Provides a way to skip bytes until the offset.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  8. cmd/storage-datatypes_test.go

    		ID:        "uuid",
    		Error:     "",
    	}
    
    	var buf bytes.Buffer
    	gob.NewEncoder(&buf).Encode(v)
    	encoded := buf.Bytes()
    	b.Log("Size:", buf.Len(), "bytes")
    	b.SetBytes(1)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		dec := gob.NewDecoder(bytes.NewBuffer(encoded))
    		err := dec.Decode(&v)
    		if err != nil {
    			b.Fatal(err)
    		}
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 9.4K bytes
    - Viewed (0)
  9. cmd/tier.go

    	return d, nil
    }
    
    // configReader returns a PutObjReader and ObjectOptions needed to save config
    // using a PutObject API. PutObjReader encrypts json encoded tier configurations
    // if KMS is enabled, otherwise simply yields the json encoded bytes as is.
    // Similarly, ObjectOptions value depends on KMS' status.
    func (config *TierConfigMgr) configReader(ctx context.Context) (*PutObjReader, *ObjectOptions, error) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  10. cmd/erasure-coding.go

    				ok = false
    				continue
    			}
    			// Delete first shard and reconstruct...
    			first := encoded[0]
    			encoded[0] = nil
    			failOnErr(e.DecodeDataBlocks(encoded))
    			if a, b := first, encoded[0]; !bytes.Equal(a, b) {
    				fmt.Fprintf(os.Stderr, "%v: error on self-test [d:%d,p:%d]: want %#v, got %#v\n", algo, conf[0], conf[1], hex.EncodeToString(a), hex.EncodeToString(b))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 31 02:11:45 GMT 2024
    - 8.6K bytes
    - Viewed (0)
Back to top