-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Buffer downloader to use ChunkSize instead of MinChunkSize. Options have been modified to only contain ChunkSize now as the root and multifile commands no longer reference MinChunkSize. This change is in support of moving towards simplifying the chunksize logic. Additionally this will make reuse of buffers significantly easier as the next phase.
- Loading branch information
1 parent
d700109
commit efe1ac0
Showing
7 changed files
with
44 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package download | ||
|
||
import ( | ||
"github.com/dustin/go-humanize" | ||
"regexp" | ||
|
||
"github.com/dustin/go-humanize" | ||
) | ||
|
||
const defaultMinChunkSize = 16 * humanize.MiByte | ||
const defaultChunkSize = 125 * humanize.MiByte | ||
|
||
var contentRangeRegexp = regexp.MustCompile(`^bytes .*/([0-9]+)$`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters