- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for validateSparseEntries (0.22 sec)
-
src/archive/tar/tar_test.go
wantValid: false, }, { in: []sparseEntry{{1, 3}, {2, 2}}, size: 10, wantValid: false, }} for i, v := range vectors { gotValid := validateSparseEntries(v.in, v.size) if gotValid != v.wantValid { t.Errorf("test %d, validateSparseEntries() = %v, want %v", i, gotValid, v.wantValid) } if !v.wantValid { continue } gotAligned := alignSparseEntries(append([]sparseEntry{}, v.in...), v.size)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jul 25 00:25:45 UTC 2024 - 23.9K bytes - Viewed (0) -
src/archive/tar/common.go
type ( sparseDatas []sparseEntry sparseHoles []sparseEntry ) // validateSparseEntries reports whether sp is a valid sparse map. // It does not matter whether sp represents data fragments or hole fragments. func validateSparseEntries(sp []sparseEntry, size int64) bool { // Validate all sparse entries. These are the same checks as performed by // the BSD tar utility.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 13 21:03:27 UTC 2024 - 24.5K bytes - Viewed (0) -
src/archive/tar/writer_test.go
w := testNonEmptyWriter{bb} var fw fileWriter switch maker := v.maker.(type) { case makeReg: fw = ®FileWriter{w, maker.size} wantStr = maker.wantStr case makeSparse: if !validateSparseEntries(maker.sph, maker.size) { t.Fatalf("invalid sparse map: %v", maker.sph) } spd := invertSparseEntries(maker.sph, maker.size) fw = ®FileWriter{w, maker.makeReg.size}
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 39.4K bytes - Viewed (0) -
src/archive/tar/reader.go
} // If sp is non-nil, then this is a sparse file. // Note that it is possible for len(sp) == 0. if err == nil && spd != nil { if isHeaderOnlyType(hdr.Typeflag) || !validateSparseEntries(spd, hdr.Size) { return ErrHeader } sph := invertSparseEntries(spd, hdr.Size) tr.curr = &sparseFileReader{tr.curr, sph, 0} } return err }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Mar 08 01:59:14 UTC 2024 - 26.8K bytes - Viewed (0) -
src/archive/tar/reader_test.go
var fr fileReader switch maker := v.maker.(type) { case makeReg: r := testNonEmptyReader{strings.NewReader(maker.str)} fr = ®FileReader{r, maker.size} case makeSparse: if !validateSparseEntries(maker.spd, maker.size) { t.Fatalf("invalid sparse map: %v", maker.spd) } sph := invertSparseEntries(maker.spd, maker.size) r := testNonEmptyReader{strings.NewReader(maker.makeReg.str)}
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 03 15:48:09 UTC 2024 - 46.9K bytes - Viewed (0)