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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d42619e6a8a00add,start X-Google-Attributes: gid103376,public From: Matthew Subject: Reading "leftover" chunks from files Date: 1999/08/20 Message-ID: <37BCD2F1.E0AECF04@Think.So>#1/1 X-Deja-AN: 514971223 Content-Transfer-Encoding: 7bit Organization: University of Queensland X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-08-20T00:00:00+00:00 List-Id: 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. EG If the file I'm reading is: [ABC|DEF|GHI|JK] (where | represents a chunk border, not an actual byte) I want to be able to read: JK, then GHI, then DEF, then ABC I'd say Direct_IO comes into it, and the full-sized chunks (eg ABC) are easy to get, but how do I pick up the JK without scanning through the whole file? MB Email: ua.ten.qu@olokom (backwards) -- How am I supposed to hallucinate with all of these coloured lights distracting me?