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.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,435e65f4acf8bd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-15 11:32:09 PST Path: supernews.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out.usenetserver.com!feed2.onemain.com!feed1.onemain.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.skycache.com!Cidera!cpk-news-hub1.bbnplanet.com!news.gtei.net!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: mark_lundquist@my-deja.com Newsgroups: comp.lang.ada Subject: Re: bitstreams Date: Mon, 15 Jan 2001 19:21:53 GMT Organization: Deja.com Message-ID: <93vik8$u08$1@nnrp1.deja.com> References: <93se2v$nen$1@eol.dd.chalmers.se> NNTP-Posting-Host: 130.213.200.127 X-Article-Creation-Date: Mon Jan 15 19:21:53 2001 GMT X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) X-Http-Proxy: 1.1 x54.deja.com:80 (Squid/1.1.22) for client 130.213.200.127 X-MyDeja-Info: XMYDJUIDmark_lundquist Xref: supernews.google.com comp.lang.ada:4020 Date: 2001-01-15T19:21:53+00:00 List-Id: In article <93se2v$nen$1@eol.dd.chalmers.se>, "Daniel Nilsson" wrote: > Hi. > In my mp3 decoder I will have to search for bit-patterns in a buffer of > bytes, how is this best done, and How can I "shift" in a sequence of bits > into a byte, or word efficiently? (I want ex. take 5 bits from a buffer and > put them rightadjusted in a unsigned_32) Note that shift and rotate functions are primitive operations of the Signed_ and Unsigned_ families of types (RM [B.2]) > > /Daniel Nilsson > > Sent via Deja.com http://www.deja.com/