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,fad7b049cb669896 X-Google-Attributes: gid103376,public From: jerry@jvdsys.stuyts.nl (Jerry van Dijk) Subject: Re: Ada95 Streams Date: 1998/12/02 Message-ID: #1/1 X-Deja-AN: 417926705 References: <742rpk$2t4$1@nnrp1.dejanews.com> Organization: * JerryWare *, Leiden, Holland Newsgroups: comp.lang.ada Date: 1998-12-02T00:00:00+00:00 List-Id: david_jones_98@yahoo.com wrote: : I'm using stream_io get heterogeneous (several different types) input from a : binary file, which works great. I read in a block of data from the file, then : perform a crc check on it, and then if the crc is ok, i need to read some : records from that block of data which is now in memory. I'd like to do this : using the same stream attributes I use when reading from the file. : How should I extend the root_stream_type to do this? At the moment I store the : block of data as an array of bytes. What I usually do, is to read the data into a block of memory, than use the System.Address_To_Access_Conversions package to create an access type and value to the records inside it. The DLL2DEF package on my homepage uses this. Jerry. -- -- Jerry van Dijk | email: jdijk@acm.org -- Leiden, Holland | member Team-Ada -- Ada & Win32: http://stad.dsl.nl/~jvandyk