[BitTorrent] bencode float support

Marcel Popescu mdpopescu at yahoo.com
Wed Aug 11 09:17:59 EDT 2004


From: "John Hoffman" <theshadow at shambala.net>

> float support will never be added to the official bencode specification,
> because an important property of bencode is:
> bencode(bdecode(x)) == x
>
> This is impossible to do consistently with true floating-point values.

Are you saying that floating point numbers cannot be serialized??? If you
are, then you're wrong. At the worst, I can convert each bit from an IEEE
specification for floating-point numbers into an ASCII 0 or 1 and generate a
string like 01001101..., and I can absolutely rebuild the floating point
number from that.

If your comment had something to do with that guy's specific code for
bencoding fp numbers (haven't checked it), then simply change the algorithm.

Marcel




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/dkFolB/TM
--------------------------------------------------------------------~-> 

 
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