From: Ryan Dary <[EMAIL PROTECTED]>
Date: Mon, 06 Nov 2006 17:08:01 -0800
I'm trying to get an array of "characters" for some
character-by-character parsing and here is how I'm doing it:
dim f As FolderItem = GetOpenFolderItem("????")
dim io As BinaryStream = f.OpenAsBinary(false)
dim chars() As String = Split(io.Read(io.length),"")
I'm wondering if this is the "fastest" way to do it in RB without
plugins or declares. Obviously it works fine on some small files, but
seems too long in other cases. Perhaps I need to wrap this another
way
and do "chunks" of the file at a time??
Comments and suggestions are encouraged.
Thanks,
Ryan Dary
NOTE: I just typed that code above, it might not actually run, but you
get the idea hopefully.
Redesign your code to not even need an array? Why not just read the
binary stream directly? As binarystream should do it's own caching,
even if it's done by the OS and not by RB.
bs.ReadByte should work fine?
This isn't a case for ElfData, not this time. Were you parsing a file
format like HTML or some other file format, it probably would be.
--
http://elfdata.com/plugin/
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>