mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-02 23:08:07 +08:00
build fixed
This commit is contained in:
parent
02deb3cccb
commit
94b8f1d22b
@ -64,21 +64,21 @@ func Rabin(b []byte) [][]byte {
|
||||
poly = (poly * prime) + cur
|
||||
curchecksum -= (uint64(b[i-1]) * prime)
|
||||
|
||||
if i-blkgBegI >= chunkMax {
|
||||
if i-blkBegI >= chunkMax {
|
||||
// push block
|
||||
out = append(out, b[blkgBegI:i])
|
||||
blkgBegI = i
|
||||
out = append(out, b[blkBegI:i])
|
||||
blkBegI = i
|
||||
}
|
||||
|
||||
// first 13 bits of polynomial are 0
|
||||
if poly%8192 == 0 && i-blkgBegI >= minBlkSize {
|
||||
if poly%8192 == 0 && i-blkBegI >= minBlkSize {
|
||||
// push block
|
||||
out = append(out, b[blkgBegI:i])
|
||||
blkgBegI = i
|
||||
out = append(out, b[blkBegI:i])
|
||||
blkBegI = i
|
||||
}
|
||||
}
|
||||
if i > blkgBegI {
|
||||
out = append(out, b[blkgBegI:])
|
||||
if i > blkBegI {
|
||||
out = append(out, b[blkBegI:])
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user