- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for blockPadding (0.07 sec)
-
src/archive/tar/writer.go
for _, s := range spd { hdr.Size += s.Length spb = append(strconv.AppendInt(spb, s.Offset, 10), '\n') spb = append(strconv.AppendInt(spb, s.Length, 10), '\n') } pad := blockPadding(int64(len(spb))) spb = append(spb, zeroBlock[:pad]...) hdr.Size += int64(len(spb)) // Accounts for encoded sparse map // Add and modify appropriate PAX records. dir, file := path.Split(realName)
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Feb 03 16:38:43 UTC 2025 - 19.7K bytes - Viewed (0) -
src/archive/tar/common.go
func alignSparseEntries(src []sparseEntry, size int64) []sparseEntry { dst := src[:0] for _, s := range src { pos, end := s.Offset, s.endOffset() pos += blockPadding(+pos) // Round-up to nearest blockSize if end != size { end -= blockPadding(-end) // Round-down to nearest blockSize } if pos < end { dst = append(dst, sparseEntry{Offset: pos, Length: end - pos}) } } return dst }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Fri Sep 13 21:03:27 UTC 2024 - 24.5K bytes - Viewed (0) -
src/archive/tar/reader_test.go
t.Errorf("test %d, Header.Size = %d, want %d", i, hdr.Size, v.wantSize) } } } func TestReadGNUSparsePAXHeaders(t *testing.T) { padInput := func(s string) string { return s + string(zeroBlock[:blockPadding(int64(len(s)))]) } vectors := []struct { inputData string inputHdrs map[string]string wantMap sparseDatas wantSize int64 wantName string wantErr error }{{
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Thu Oct 03 15:48:09 UTC 2024 - 46.9K bytes - Viewed (0)