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,LOTS_OF_MONEY, 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,bffcdbd805329ff8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-31 11:08:52 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: Subject: Re: compile time Least Common Multiple, was Re: Ada and Internet stuff Message-ID: 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: Fri, 31 Aug 2001 14:08:47 EDT Organization: http://www.newsranger.com Date: Fri, 31 Aug 2001 18:08:47 GMT Xref: archiver1.google.com comp.lang.ada:12617 Date: 2001-08-31T18:08:47+00:00 List-Id: In article , tmoran@acm.org says... > >>Why are you doing that, though? What you would generally want to figure >>out with a stream is the minimum number of stream elements that will be >>required to cover your data object's 'size. > No, I'm not concerned here with converting from my data objects to stream >elements, but with encoding successive 24 bit chunks from a supplied >stream_element_array. So I need an Unchecked_Conversion from a >subtype of stream_element_array of some length, to an array of 24 bit chunks, >so I need to know how many stream_element's are needed to make that >subtype an even multiple of 24 bits. OK. So I was talking encoding while you were talking decoding. But both processes are reversible, so we are still back to the same issue. Unless they match up perfectly, you are still going to have to deal with some extra leftover slag bits in the source object (the stream element array). So you are *still* going to have some waste at the end, which you will have to deal with by calulating the minimum number of 24 bit chunks needed to store it (or maximum that doesn't, depending on whether you want to save the leftover data, or try to use it). Why not just do that for the whole array at once and be done with it? --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com