[BitTorrent] Here's a post I would like forwarded... thanks! (fwd)

Justin Cormack justin at street-vision.com
Wed Feb 9 13:43:30 EST 2005


> > 
> > Not to beat a dead horse, but...
> > 
> > So I was re-reading the description of Merkle Hash Trees over at the
> > THEX specification (see
> > http://www.open-content.net/specs/draft-jchapweske-thex-02.html), and
> > I was thinking of implementing an efficient, array-based version in C.
> 
> Hey, I got a post through!
> 
> Well, getting back to sh4dowmatter's original post, I think it's a good
> idea.  It sounds like it needs a bit more explaining, so here's some
> additional notes I've sent to Olaf on array based complete trees (the
> last level can be incomplete).
> 
> Here's an example tree for a 9 piece torrent.  The numbers are the node
> index for the nodes.  The nodes with dashes around them are leaves, and
> represent pieces.
> 
>                     1
>           |-----------------|
>           2                 3
>       |-------|         |---------|
>       4       5         6         7
>     |---|    |---|     |---|     |---|
>     8  -9- -10- -11- -12- -13- -14- -15-
>   |---|
> -16- -17-

Yes I would prefer a dense to a sparse tree.

This isnt the only way to achieve it of course, you can virtually pad
the content with zeros until it is a power of 2 in size, you know the hash
of all zeros so you dont compute it, then all rows are the same. This takes
up a little more space but is even more regular. There are probably other
solutions too.

j


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/BitTorrent/

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

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the BitTorrent mailing list