add comment to ChoosePieceLength
This commit is contained in:
parent
f7e8a6ad2d
commit
ff11917fa8
|
@ -41,6 +41,9 @@ const (
|
||||||
const targetPieceCountMax = targetPieceCountMin << 1
|
const targetPieceCountMax = targetPieceCountMin << 1
|
||||||
|
|
||||||
// Choose a good piecelength.
|
// Choose a good piecelength.
|
||||||
|
// piecelength >= 16KB
|
||||||
|
// piecelength = 16KB*X
|
||||||
|
// totalLength / piecelength = piecenumber < 2048
|
||||||
func ChoosePieceLength(totalLength int64) (pieceLength int64) {
|
func ChoosePieceLength(totalLength int64) (pieceLength int64) {
|
||||||
// Must be a power of 2.
|
// Must be a power of 2.
|
||||||
// Must be a multiple of 16KB
|
// Must be a multiple of 16KB
|
||||||
|
|
Loading…
Reference in New Issue