🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11939

Re: Does TStream load Data (<1MB) to RAM?

#11939
From: Remy Lebeau (TeamB)
Date: Thu, 08 Jan 2004 06:22
16 lines
1689 bytes
"PC Hua" <home-at-huaonline.dot.com> wrote in message
news:opr1fvyyfveb6hof@newsgroups.borland.com...

> Yes, I mean to use LoadFromStream() to load the entire image.
> But before, the file is loaded using TFileStream::Read(void *Buffer,
> int Count) and I hope the LoadFromStream() will access the data
> from RAM and therefore will be a bit faster.

If you are using TFileStream, then it will never load the image data into
memory like you describe.  If you need that, then use TMemoyStream instead.
You can call its LoadFromFile() method to load the entire file data into
memory, and then use LoadFromStream() when needed.


Gambit
Technical Details
Message-ID: <3ffcf5b9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <opr1fk36pbeb6hof@newsgroups.borland.com> <3ffca6c3$1@newsgroups.borland.com> <opr1fvyyfveb6hof@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,fec004505ce4dded
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-07 22:22:33 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <opr1fk36pbeb6hof@newsgroups.borland.com> <3ffca6c3$1@newsgroups.borland.com> <opr1fvyyfveb6hof@newsgroups.borland.com>
Subject: Re: Does TStream load Data (<1MB) to RAM?
Date: Wed, 7 Jan 2004 22:22:22 -0800
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 67.22.138.253
Message-ID: <3ffcf5b9$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1073542585 67.22.138.253 (7 Jan 2004 22:16:25 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-hog.berkeley.edu!ucberkeley!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail