- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for alignSparseEntries (0.23 sec)
-
src/archive/tar/tar_test.go
t.Errorf("test %d, validateSparseEntries() = %v, want %v", i, gotValid, v.wantValid) } if !v.wantValid { continue } gotAligned := alignSparseEntries(append([]sparseEntry{}, v.in...), v.size) if !slices.Equal(gotAligned, v.wantAligned) { t.Errorf("test %d, alignSparseEntries():\ngot %v\nwant %v", i, gotAligned, v.wantAligned) } gotInverted := invertSparseEntries(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
return false // Region extends beyond the actual size case pre.endOffset() > cur.Offset: return false // Regions cannot overlap and must be in order } pre = cur } return true } // alignSparseEntries mutates src and returns dst where each fragment's // starting offset is aligned up to the nearest block edge, and each // ending offset is aligned down to the nearest block edge. //
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.go
/* // Handle sparse files. var spd sparseDatas var spb []byte if len(hdr.SparseHoles) > 0 { sph := append([]sparseEntry{}, hdr.SparseHoles...) // Copy sparse map sph = alignSparseEntries(sph, hdr.Size) spd = invertSparseEntries(sph, hdr.Size) // Format the sparse map. hdr.Size = 0 // Replace with encoded size spb = append(strconv.AppendInt(spb, int64(len(spd)), 10), '\n')
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Oct 02 14:22:59 UTC 2024 - 19.6K bytes - Viewed (0)