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

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

> > 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:
    [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.