Re: bencoding 0:

"skybuckflying" <[email protected]>
Newsgroups gmane.network.bit-torrent.general
Message-ID <[email protected]>

--- In [email protected], Elliott Mitchell <ehem@m...> wrote:
> >From: "Olaf van der Spek" <OvdSpek@L...>
> > > Elliott Mitchell wrote:
> > >> 
> > >> Could be worthwhile to specify that torrent files may be 
optionally
> > >> compressed using the libz style compression. Though this isn't 
a large
> > >> gain.
> > >> 
> > > 
> > > I think that we can agree that torrent files need not be 
compressed for 
> > > storage, only for transfer. HTTP already supports libz 
compression.
> > 
> > It's called gzip compression, not libz compression.
> > And HTTP isn't the only storage mechanism.
> 
> Both refer to the same flavor of LZ77+Huffman. The RFC would be a 
better
> pointer, but I didn't have the number memorized. As we're refering 
to the
> compression, not the file format, "libz" seemed more appropriate.
> 
> 
> >From: Olaf van der Spek <OvdSpek@L...>
> > >> > Why is the min size so important to you?
> > >> 
> > >> Well just so parsing routines can exit when a string is less 
than the 
> > >> minimum :)
> > > 
> > > Any string of digits is a valid string length (no one generates 
strings
> > > of length 0000, but it is valid by the spec).
> > 
> > That's not supposed to be valid.
> 
> "Strings are length-prefixed base ten followed by a colon and the 
string.
> For example 4:spam corresponds to 'spam'."
> 
> Sounds perfectly valid to me. Though I would support shooting 
anyone who
> created such strings by design.

For delphi it's no problem :)

ShowMessage( IntToStr( StrToInt( '000' ) ) );

This shows 0 :) without exceptions etc ;)

Though other languages might have problems converting string '0000' 
to 0 :)

Test it ;)

Bye,
  Skybuck.





------------------------ 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:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.