[bittorrent] The size of XML (was: DTD for hashed files)

David P. Mott dpmott at sep.com
Tue Apr 12 11:50:19 EDT 2005

> From: "Andrew Brampton" <andrew at bramp.freeserve.co.uk>
> I know this wasn't the topic of the original posting, but I thought I'll
> just splinter off to provide dpmott with some "overhead numbers"
> Using XML for the torrent file would be bad in my opinion. The reasons being
> are these:
> 3) Beencoding is smaller than XML. Ok, we can live with a little overhead
> caused by the file names, file sizes, dates, etc (basically anything at the
> top of the .torrent). Its the binary encoding of the pieces that's the
> problem. XML as far as I know uses Base64 to encode binary data, now that
> adds a 33% overhead instantly [1].

The new(er?) XML spec allows for embedded binary data, along the lines of 
a binary attachment in a MIME message.  Given that, any large chunk of 
binary data (such as the SHA1 hash values) could be included in that 
manner.  This also saves the encoding/decoding at each end.  It's this new 
functionality that compels me to bring up the use of XML again, since it 
seems to address the classic argument against the use of XML.

Here:  http://www.w3.org/2005/01/xmlp-pressrelease

Read the section on "XOP Allows Efficient Encoding of Binary Data in XML".

Because data can be stored in binary format, I think that addresses your 
#2 as well.  I won't argue with your #1, but it's a weak argument against 

So, now, where does that leave us?  Is XML still a bad idea, or is it just 

(I'm not ranting, although a re-read of my text leaves me thinking that it 
might come across that way.  My apologies.  Sometimes I get tenacious 
while making a point.  I appreciate and value your post and your points.)


More information about the BitTorrent mailing list