An application that downloads parts of a file from a web server.
- Download complete file.
- Download part of a file using the 'Range' header.
- Only download the first 4MiB in 1MiB chunks.
- Write to disk.
- Source specified by cli option.
- File is downloaded in 4 parts (4 requests to server).
- Only the first 4MiB of the file should be downloaded.
- Output file may be specified with a cli option.
- Output file may have default.
- No corruption.
- File retrieved using GET requests.
- Parallel download
- Support files smaller than 4MiB
- Configurable number of chunks, chunk size, and total download size.
- HTTPS
- Range header unsupported/fallback
- Other HTTP methods
- Re-use existing connections with keep-alive
- PHP 7.1
php composer.phar install
There is only one command supported.
bin/download
--url=URL STRING
[--output=FILE PATH]
[--parts=NUMBER|4]
[--part-size=NUMBER|1MiB]
[--download-size=NUMBER|4MiB]
-
--url
(STRING) requiredAddress to download file.
-
--output
(STRING) optionalPath to file on file system. Will overwrite file.
Defaults to ./ccc.file.
-
--parts
(NUMBER) optionalNumber of requests in order to chunk the file downloaded.
Defaults to 4.
-
--part-size
(NUMBER) optionalNumber of bytes for each chunk.
Defaults to 1MiB.
-
--download-size
(NUMBER) optionalNumber of bytes to download in total.
Defaults to 4MiB.