add comment to ChoosePieceLength

This commit is contained in:
whr819987540 2023-04-27 10:38:37 +08:00
parent f7e8a6ad2d
commit ff11917fa8
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ const (
const targetPieceCountMax = targetPieceCountMin << 1
// Choose a good piecelength.
// piecelength >= 16KB
// piecelength = 16KB*X
// totalLength / piecelength = piecenumber < 2048
func ChoosePieceLength(totalLength int64) (pieceLength int64) {
// Must be a power of 2.
// Must be a multiple of 16KB