Commit 94b8f1d2 authored by Siraj Ravel's avatar Siraj Ravel

build fixed

parent 02deb3cc
...@@ -64,21 +64,21 @@ func Rabin(b []byte) [][]byte { ...@@ -64,21 +64,21 @@ func Rabin(b []byte) [][]byte {
poly = (poly * prime) + cur poly = (poly * prime) + cur
curchecksum -= (uint64(b[i-1]) * prime) curchecksum -= (uint64(b[i-1]) * prime)
if i-blkgBegI >= chunkMax { if i-blkBegI >= chunkMax {
// push block // push block
out = append(out, b[blkgBegI:i]) out = append(out, b[blkBegI:i])
blkgBegI = i blkBegI = i
} }
// first 13 bits of polynomial are 0 // first 13 bits of polynomial are 0
if poly%8192 == 0 && i-blkgBegI >= minBlkSize { if poly%8192 == 0 && i-blkBegI >= minBlkSize {
// push block // push block
out = append(out, b[blkgBegI:i]) out = append(out, b[blkBegI:i])
blkgBegI = i blkBegI = i
} }
} }
if i > blkgBegI { if i > blkBegI {
out = append(out, b[blkgBegI:]) out = append(out, b[blkBegI:])
} }
return out return out
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment