[BitTorrent] Re: Follow up: Are metainfo (.torrent) files text files ? ;)

skybuckflying skybuck2000 at hotmail.com
Mon Nov 22 21:47:42 EST 2004



> > My final conclusion and advice is: don't try processing
> > torrent/metainfo files as text files with Delphi ;) and possibly
> > other languages... :D
> 
> Wrong, Delphi's just fine, as long as you don't use the buggy 
parts. Use

Yes, that's what I ment...

"Don't use delphi's text file routines or the TstringList"

"Just use the binary TfileStream as you mention ;)"

> streams:
> 
> This is what I'm using to read files of any kind - it has no 
problem with
> #0s:
> 
>   function      LoadFile (const pFileName: string): string;
>   var
>     str         : TFileStream;
> 
>   begin
>     Result := '';
> 
>     str := TFileStream.Create (pFileName, fmOpenRead or 
fmShareDenyNone);
>     try
>       SetLength (Result, str.Size);
>       str.Read (Result [1], Length (Result));
> 
>     finally
>       str.Free;
>     end;
>   end;

Bye,
  Skybuck.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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