aboutsummaryrefslogtreecommitdiff
path: root/packed_write_pack.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-01-29 21:01:40 +0100
committerGravatar Runxi Yu2026-01-29 21:01:40 +0100
commitac400226b0b622aae21b09cb6c83f07924647d0d (patch)
treee97f3b6fe59fe36f00d2fe9934c4304b7c29fa68 /packed_write_pack.go
parentgo.mod: Introduce xxhash (diff)
signatureNo signature
delta, packed: Use xxhash instead of murmurhash2
Diffstat (limited to 'packed_write_pack.go')
-rw-r--r--packed_write_pack.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/packed_write_pack.go b/packed_write_pack.go
index 032e308d..aa5b7aa0 100644
--- a/packed_write_pack.go
+++ b/packed_write_pack.go
@@ -319,14 +319,14 @@ func (repo *Repository) packWrite(w io.Writer, objects []Hash, opts packWriteOpt
}
var dctx deltaContext
- var deltaSeed uint32
+ var deltaSeed uint64
if opts.EnableDeltas {
dctx.window = defaultDeltaWindow
- var seedBytes [4]byte
+ var seedBytes [8]byte
if _, err := rand.Read(seedBytes[:]); err != nil {
return Hash{}, err
}
- deltaSeed = binary.LittleEndian.Uint32(seedBytes[:])
+ deltaSeed = binary.LittleEndian.Uint64(seedBytes[:])
}
for _, id := range objects {