[BitTorrent] Really random?

John Prevost j.prevost at gmail.com
Wed Jul 14 16:13:07 EDT 2004

On Wed, 14 Jul 2004 21:56:46 +0200, Arvid Norberg <c99ang at cs.umu.se> wrote:
> > Are you sure?. I thought BT client used the "sparse file" concept.
> yes.
> This is, roughly, the algorithm I employ in libtorrent, I'm pretty sure
> it's the same for all clients supporting this kind of storage.


Well, I can tell you for a fact that neither the standard Python
client nor Azureus do it that way.  They just make use of sparse
files--they seek to the position of the received data and write it
out.  The OS decides whether or not the file is fully allocated to
that size or if only the blocks needed for the data actually written
are used.  (Both Unices and Windows 2k do support sparse files, not
sure about other OSs.)

The system you describe sounds... rather hairy, really.  When you scan
a file to see what has been received so far, do you scan each piece
and see if its hash is in the list to recall which piece it is?  Or do
you write the information about which pieces reside where to a file
somewhere?  How do you handle multi-file torrents?


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70

Yahoo! Groups Links

<*> To visit your group on the web, go to:

<*> To unsubscribe from this group, send an email to:
    BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

More information about the BitTorrent mailing list