reduce piece size by factor of 8

pull/5/head
Zlatin Balevsky 2019-06-13 15:24:26 +01:00
parent a45e57f5ec
commit 66cc6d8ab7
1 changed files with 3 additions and 3 deletions

View File

@ -20,12 +20,12 @@ class FileHasher {
* @return the size of each piece in power of 2
*/
static int getPieceSize(long size) {
if (size <= 0x1 << 27)
if (size <= 0x1 << 30)
return 17
for (int i = 28; i <= 37; i++) {
for (int i = 31; i <= 37; i++) {
if (size <= 0x1L << i) {
return i-10
return i-13
}
}