[bittorrent] distinct hashes for individual files within a torrent

Kevin Fraser airdriepiper at hotmail.com
Sat Apr 10 17:22:19 EDT 2010


A benefit I can foresee for having each file have its own hash is if you have a number of files that are identical between multiple torrents, then you may be able to find the file via DHT without having the same torrent as someone else.
 
> From: bittorrent-request at lists.ibiblio.org
> Subject: BitTorrent Digest, Vol 50, Issue 2
> To: bittorrent at lists.ibiblio.org
> Date: Sat, 10 Apr 2010 13:20:12 -0400
> 
> Send BitTorrent mailing list submissions to
> bittorrent at lists.ibiblio.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.ibiblio.org/mailman/listinfo/bittorrent
> or, via email, send a message with subject or body 'help' to
> bittorrent-request at lists.ibiblio.org
> 
> You can reach the person managing the list at
> bittorrent-owner at lists.ibiblio.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of BitTorrent digest..."
> 
> 
> Today's Topics:
> 
> 1. Re: structure of multifile bittorrent file (Song Zhang)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 10 Apr 2010 09:38:09 -0600
> From: Song Zhang <songzhang2008 at gmail.com>
> Subject: Re: [bittorrent] structure of multifile bittorrent file
> To: Alan McGovern <alan.mcgovern at gmail.com>
> Cc: bittorrent at lists.ibiblio.org
> Message-ID:
> <n2r59528aee1004100838r54463533h6212d6428e69dc1b at mail.gmail.com>
> Content-Type: text/plain; charset="windows-1252"
> 
> thanks for the reply,
> 
> you mentioned that if I want to download one specific file from a large
> torrent, it is easily accomplished with the current specification.
> 
> could you tell me which BEP ? and is it accomplished by current mainline
> bittorrent ? which version ?
> 
> 2010/4/10 Alan McGovern <alan.mcgovern at gmail.com>
> 
> > To be honest, there's very little benefit to doing so. You'll download
> > at the absolute most about 2xPieceLength bytes too much. This is a
> > tiny fraction of the total torrent size if PieceLength is chosen
> > properly. The on-disk usage can also be as little as 2xPieceLength
> > bytes too much depending on how you store the data. With that in mind,
> > it's not worth the hassle the junk files or incompatibilities would
> > cause.
> >
> > If you want to download one specific file from a large torrent, this
> > is easily accomplished with the current specification.
> >
> > Alan.
> >
> > On Sat, Apr 10, 2010 at 10:13 AM, Harold Feit <dwknight at depthstrike.com>
> > wrote:
> > > Such a procedure was attempted using bitcomet, and was not met well
> > > within the torrent community. It is a kludge that breaks compatibility.
> > >
> > > Song Zhang wrote:
> > >> I wonder if I change the torrent file format for (a+b) files with the
> > >> modification of btmakemetafile.py. The final piece in file a does not
> > >> overlap with file b which means that file a hash and file b hash have
> > >> clear boundary in torrent file. Can I still download smoothly with
> > >> current bittorrent program ?
> > >>
> > >> thanks a lot !
> > >>
> > >> 2010/4/9 Alan McGovern <alan.mcgovern at gmail.com
> > >> <mailto:alan.mcgovern at gmail.com>>
> > >>
> > >> In the bittorrent protocol you treat all the files in your torrent
> > as
> > >> if they were one continuous file. This single continous file is
> > split
> > >> into pieces (in your case of size 256kb) and hashed. The final piece
> > >> will be <= 256kB. It has no special handling except for the fact
> > that
> > >> it is not guaranteed to be exactly 'PieceLength' bytes in size as
> > all
> > >> other pieces are. In all other ways, the last piece is identical to
> > >> every other piece.
> > >>
> > >> Blocks are always 16kB (as per defacto standard) except for the very
> > >> last block which will be <= 16kB. As before, this has no special
> > >> handling except for the fact its size may be less than 16kB whereas
> > >> all other blocks are guaranteed to be 16kB in length. In all other
> > >> ways it is identical to other blocks
> > >>
> > >> Hope that helps.
> > >>
> > >> Alan.
> > >>
> > >> On Fri, Apr 9, 2010 at 10:51 PM, Song Zhang <
> > songzhang2008 at gmail.com
> > >> <mailto:songzhang2008 at gmail.com>> wrote:
> > >> > Hi,
> > >> > I have a question about the structure of multifile torrent file
> > >> > for example, I have two files a and b, and put them into one
> > >> directory. I am
> > >> > trying to create one torrent file including the contents of these
> > >> two files.
> > >> > I am wondering how the system handling the last piece less than
> > >> 256k for
> > >> > each file of a and b,
> > >> > size(a) = n * 256k + a1
> > >> > size(b) = m * 256k + b1
> > >> > a1 and b1 above all less than 256k
> > >> > the question is:
> > >> > 1. when generating torrent files, for the ?pieces? part of info
> > >> dictionary
> > >> > of torrent file, there should be two SHA1 value from pieces less
> > >> than 256k,
> > >> > right ? Although the SHA1 value of each piece (no matter greater
> > >> or less
> > >> > than 256k) is always 20bytes.
> > >> > 2. but I don't understand during the data transfer period, the
> > >> pieces are
> > >> > divided into blocks and how to handle these pieces less than 256k
> > ?
> > >> > thanks a lot for the help !!
> > >> > _______________________________________________
> > >> > BitTorrent mailing list
> > >> > BitTorrent at lists.ibiblio.org <mailto:BitTorrent at lists.ibiblio.org
> > >
> > >> > http://lists.ibiblio.org/mailman/listinfo/bittorrent
> > >> >
> > >> >
> > >>
> > >>
> > >>
> > >> ------------------------------------------------------------------------
> > >>
> > >> _______________________________________________
> > >> BitTorrent mailing list
> > >> BitTorrent at lists.ibiblio.org
> > >> http://lists.ibiblio.org/mailman/listinfo/bittorrent
> > >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.ibiblio.org/pipermail/bittorrent/attachments/20100410/5717d168/attachment-0001.htm 
> 
> ------------------------------
> 
> _______________________________________________
> BitTorrent mailing list
> BitTorrent at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/bittorrent
> 
> 
> End of BitTorrent Digest, Vol 50, Issue 2
> *****************************************
 		 	   		  
_________________________________________________________________
Hotmail & Messenger. Get them on your phone now.
http://go.microsoft.com/?linkid=9724463
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/bittorrent/attachments/20100410/c11d0908/attachment.html 


More information about the BitTorrent mailing list