How can I implement segmented downloads?

0 votes
asked May 17, 2011 by John Hancock (260 points)
edited May 19, 2011

I need to implement segmented downloads.

Meaning... If there is a file on the server which is 1GB, how can I download it in 100MB segments?

I want to have 10 connections... each downloading 100MB of the file at different offsets: File.avi.001 File.avi.002 ... File.avi.010

Then, I will concatenate those files once the transfers are complete.

Is this possible with Rebex? I don't see a GetFile() overload with a "length" parameter.

I see that it is possible with PutFile.

Applies to: Rebex FTP/SSL

1 Answer

0 votes
answered May 18, 2011 by Lukas Matyska (47,230 points)
edited May 19, 2011

The GetFile method doesn't have the "length" parameter, because the FTP protocol doesn't have a command to limit the length of transferred data (only the offset where the transfer starts can be specified within the FTP protocol).

Actually, what do you want to achieve by segmented download?

commented May 18, 2011 by John Hancock (260 points)
edited May 18, 2011

I'm attempting to speed up transfers.

I was able to write a function around GetDownloadStream that is allowing me to do what I want. My download went from 13Mbps to 24Mbps.

commented May 19, 2011 by Lukas Matyska (47,230 points)
edited May 19, 2011

If speed up transfer is desired, please try to enable large buffers as described at http://forum.rebex.net/questions/173/how-to-optimize-transfer-performance-with-uploadbufferlength

...