pull/5/head
Zlatin Balevsky 2019-06-30 12:51:34 +01:00
parent 3fefbc94b3
commit d9e7d67d86
1 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,8 @@ class FileHasher {
/**
* @param size of the file to be shared
* @return the size of each piece in power of 2
* piece size is minimum 128 KBytees and maximum 16 MBytes in power of 2 steps (2^17 - 2^24)
* there can be up to 8192 pieces maximum per file
*/
static int getPieceSize(long size) {
if (size <= 0x1 << 30)