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.9 required=5.0 tests=BAYES_00 autolearn=ham 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 13:56:02 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.bu.edu!inmet!not-for-mail From: Tucker Taft Newsgroups: comp.lang.ada Subject: Re: bitstreams Date: Mon, 15 Jan 2001 16:54:18 -0500 Organization: AverStar (formerly Intermetrics) Burlington, MA USA Message-ID: <3A63718A.12F72E9E@averstar.com> References: <93se2v$nen$1@eol.dd.chalmers.se> <3A622CE5.89C9378E@worldnet.att.net> <93vkl3$1j$1@nnrp1.deja.com> NNTP-Posting-Host: nebula.burl.averstar.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: inmet2.burl.averstar.com 979595658 909 141.199.8.77 (15 Jan 2001 21:54:18 GMT) X-Complaints-To: usenet@inmet2.burl.averstar.com NNTP-Posting-Date: 15 Jan 2001 21:54:18 GMT X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:4030 Date: 2001-01-15T21:54:18+00:00 List-Id: mark_lundquist@my-deja.com wrote: > > In article <3A622CE5.89C9378E@worldnet.att.net>, > srini wrote: > > > > I do not know much about mp3 etc but I have developed a bit stream > > package which allows you to perform reads in terms of bits. I use > these > > in my own compression/decompression test software. The spec is > attached. > > > ---------------------------------------------------------------------- > > package Bits_Io is > > > > type File_Type is limited private; > > type File_Mode is (In_File, Out_File, Append_File); > > > > type Vector_type is array (natural range <>) of boolean ; > > pragma pack( Vector_Type ) ; > . > . > . > > Beware, though... this is implementation-dependent. If the compiler > doesn't represent a packed array of boolean as a bit vector, it doesn't > work. Any Ada 95 compiler that has passed the chapter 13 ACATS (aka ACVCs) supports packed bit vectors, so not-to-worry (cf. generic Length_Check used by many chapter 13 "cd*.*" tests). Ada 95 requires support for packed bit vectors as part of conforming to the Systems Programming Annex, and about the only compilers that don't support the Systems Programming Annex these days are those that generate Java byte codes (and even those can support packed bit vectors without too much pain, though supporting arbitrary unchecked conversion is generally not possible). > ... > Mark Lundquist -- -Tucker Taft stt@avercom.net http://www.averstar.com/~stt/ Chief Technology Officer, AverCom, Inc. (A Titan Company) Burlington, MA USA (AverCom was formed 1/1/01 from the Commercial Division of AverStar) (http://www.averstar.com/services/ebusiness_applications.html)