From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8efa3c7b8890281b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-06 09:03:30 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3b6dc4ed@post.newsfeeds.com> Subject: Re: implementation question about writing and reading from files Message-ID: <8dzb7.415$NJ6.1026@www.newsranger.com> X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 06 Aug 2001 12:03:16 EDT Organization: http://www.newsranger.com Date: Mon, 06 Aug 2001 16:03:16 GMT Xref: archiver1.google.com comp.lang.ada:11384 Date: 2001-08-06T16:03:16+00:00 List-Id: In article <3b6dc4ed@post.newsfeeds.com>, Francis Crick says... >read a chunk of any size from any part of a file and write it into memory >and pass back the pointer. > >write a chunk of any size into any part of any file. > >should I use streams? If so, which stream components? Also, whats the best >format to keep a big bunch of bytes in memory? Should that be a stream of >some sort, or a big array or what? I'd probably use streams for this, yes. See Tom Moran's message for the specific calls. You could just use the stream attributes instead of Read and Write, but that would create one I/O per byte, which can be rather slow. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com