reduce piece size

pull/4/head
Zlatin Balevsky 2019-06-08 07:57:36 +01:00
parent 36eb632756
commit 9bafdfe0b1
1 changed files with 4 additions and 4 deletions

View File

@ -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
}
}