- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for bitrotWriterSum (0.13 sec)
-
cmd/erasure-heal_test.go
// Verify that checksums of staleDisks // match expected values for i := range staleWriters { if staleWriters[i] == nil { continue } if !bytes.Equal(bitrotWriterSum(staleWriters[i]), bitrotWriterSum(writers[i])) { t.Errorf("Test %d: heal returned different bitrot checksums", i) } } } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.9K bytes - Viewed (0) -
cmd/bitrot_test.go
} _, err = writer.Write([]byte("aaaaa")) if err != nil { t.Fatal(err) } if bw, ok := writer.(io.Closer); ok { bw.Close() } reader := newBitrotReader(disk, nil, volume, filePath, 35, bitrotAlgo, bitrotWriterSum(writer), 10) b := make([]byte, 10) if _, err = reader.ReadAt(b, 0); err != nil { t.Fatal(err) } if _, err = reader.ReadAt(b, 10); err != nil { t.Fatal(err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 2.1K bytes - Viewed (0) -
cmd/bitrot.go
for _, w := range ws { if w != nil { if bw, ok := w.(io.Closer); ok { bw.Close() } } } } // Returns hash sum for whole-bitrot, nil for streaming-bitrot. func bitrotWriterSum(w io.Writer) []byte { if bw, ok := w.(*wholeBitrotWriter); ok { return bw.Sum(nil) } return nil } // Returns the size of the file with bitrot protection
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 7.6K bytes - Viewed (0) -
cmd/erasure-decode_test.go
continue } tillOffset := erasure.ShardFileOffset(test.offset, test.length, test.data) bitrotReaders[index] = newBitrotReader(disk, nil, "testbucket", "object", tillOffset, writeAlgorithm, bitrotWriterSum(writers[index]), erasure.ShardSize()) } writer := bytes.NewBuffer(nil) _, err = erasure.Decode(context.Background(), writer, bitrotReaders, test.offset, test.length, test.data, nil)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 30 20:43:25 UTC 2024 - 21.1K bytes - Viewed (0)