I just notice that mb = bs.Read(691200) also works. I obviously have been using memoryblocks incorrectly.
-Drew On Apr 6, 2007, at 11:49 AM, Drew F. wrote: > I recently started using the memoryblock.stringvalue to replace > loading binarystream data into a memoryblock. It seems to be a little > faster, definitely is easier to write. Are their any pitfalls I need > to be aware of? > > mb = new MemoryBlock(691199) > mb.LittleEndian = true > > bs = folderitem.openAsBinaryFile(false) > bs.Position = offset //offset into file > bs.LittleEndian = true > > So code that used to read: > > For j = 0 to 691199 step 8 > mb.UInt64Value(j) = bs.ReadUInt64 > next > > becomes: > > mb.StringValue(0,691200) = bs.Read(691200) > > Seems to work fine on Mac PPC/Intel and Win XP/Vista. Am I missing > anything? I am doing bitwise operations on the memoryblock, is there > a case when then won't work? > > Thanks, > Drew > > > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
