reduce piece size
This commit is contained in:
@@ -17,12 +17,12 @@ class FileHasher {
|
||||
* @return the size of each piece in power of 2
|
||||
*/
|
||||
static int getPieceSize(long size) {
|
||||
if (size <= 0x1 << 25)
|
||||
return 18
|
||||
if (size <= 0x1 << 27)
|
||||
return 17
|
||||
|
||||
for (int i = 26; i <= 37; i++) {
|
||||
for (int i = 28; i <= 37; i++) {
|
||||
if (size <= 0x1L << i) {
|
||||
return i-7
|
||||
return i-10
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user