Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How download manager breaks the file into multiple parts?

I am not clear about the concept of breaking the file into multiple part and then download each part separately. According to me, What we have only the path of that file where it exist on the internet so how to break this file just by knowing the URL or path?

like image 901
Jatin Khurana Avatar asked Jan 10 '13 09:01

Jatin Khurana


2 Answers

There is a special provision in HTTP 1.1 for this: the Range header, which allows you to fetch a selected portion of the resource. This is exactly what these download managers use.

like image 191
Marko Topolnik Avatar answered Oct 23 '22 16:10

Marko Topolnik


You can review some code example in Java of partial file download: Resume download in urlconnection. In rfc2616 specified header 'Range' allows to request specified part of file.

So Download Manager simply start partial file downloading in several connection in parallel.

like image 21
Taky Avatar answered Oct 23 '22 17:10

Taky