Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
94b8f1d2
Commit
94b8f1d2
authored
Sep 12, 2014
by
Siraj Ravel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build fixed
parent
02deb3cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
importer/splitting.go
importer/splitting.go
+8
-8
No files found.
importer/splitting.go
View file @
94b8f1d2
...
@@ -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
-
blk
g
BegI
>=
chunkMax
{
if
i
-
blkBegI
>=
chunkMax
{
// push block
// push block
out
=
append
(
out
,
b
[
blk
g
BegI
:
i
])
out
=
append
(
out
,
b
[
blkBegI
:
i
])
blk
g
BegI
=
i
blkBegI
=
i
}
}
// first 13 bits of polynomial are 0
// first 13 bits of polynomial are 0
if
poly
%
8192
==
0
&&
i
-
blk
g
BegI
>=
minBlkSize
{
if
poly
%
8192
==
0
&&
i
-
blkBegI
>=
minBlkSize
{
// push block
// push block
out
=
append
(
out
,
b
[
blk
g
BegI
:
i
])
out
=
append
(
out
,
b
[
blkBegI
:
i
])
blk
g
BegI
=
i
blkBegI
=
i
}
}
}
}
if
i
>
blk
g
BegI
{
if
i
>
blkBegI
{
out
=
append
(
out
,
b
[
blk
g
BegI
:
])
out
=
append
(
out
,
b
[
blkBegI
:
])
}
}
return
out
return
out
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment