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=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d42619e6a8a00add X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Reading "leftover" chunks from files Date: 1999/08/20 Message-ID: <7pjlfa$o45$1@nnrp1.deja.com>#1/1 X-Deja-AN: 515093929 References: <37BCD2F1.E0AECF04@Think.So> X-Http-Proxy: 1.0 x38.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Fri Aug 20 13:33:31 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-08-20T00:00:00+00:00 List-Id: In article <37BCD2F1.E0AECF04@Think.So>, Matthew wrote: > Greetings, > > This is a "what's the best way of doing this" question. > > I want to read in a file so that I can get fixed-length chunks of data > backwards, and also read in whatever data (smaller than the chunk size) > is left behind at the end of the file. Direct_IO and Sequential_IO are NEVER appropriate for this kind of job, since they output data in implementation dependent form. Always use stream_io for a task like this, and then you have complete control over what you read, and from where you read it in the file. Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.