Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for DecodeDataBlocks (0.1 sec)

  1. cmd/erasure-coding.go

    	}
    	if err = e.encoder().Encode(encoded); err != nil {
    		return nil, err
    	}
    	return encoded, nil
    }
    
    // DecodeDataBlocks decodes the given erasure-coded data.
    // It only decodes the data blocks but does not verify them.
    // It returns an error if the decoding failed.
    func (e *Erasure) DecodeDataBlocks(data [][]byte) error {
    	isZero := 0
    	for _, b := range data {
    		if len(b) == 0 {
    			isZero++
    			break
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Jan 31 02:11:45 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. cmd/erasure_test.go

    			encoded[j] = nil
    		}
    
    		if test.reconstructParity {
    			err = erasure.DecodeDataAndParityBlocks(context.Background(), encoded)
    		} else {
    			err = erasure.DecodeDataBlocks(encoded)
    		}
    
    		if err == nil && test.shouldFail {
    			t.Errorf("Test %d: test should fail but it passed", i)
    		}
    		if err != nil && !test.shouldFail {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 25 19:37:26 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  3. cmd/erasure-decode.go

    				if derr == nil {
    					derr = err
    				}
    			}
    		} else if err != nil {
    			// For all errors that cannot be reconstructed fail the read operation.
    			return -1, err
    		}
    
    		if err = e.DecodeDataBlocks(bufs); err != nil {
    			return -1, err
    		}
    
    		n, err := writeDataBlocks(ctx, writer, bufs, e.dataBlocks, blockOffset, blockLength)
    		if err != nil {
    			return -1, err
    		}
    
    		bytesWritten += n
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 29 01:40:52 UTC 2024
    - 9.5K bytes
    - Viewed (0)
Back to top