Message-ID: <38E13110.841FC011@gtcom.net> From: Krogg X-Mailer: Mozilla 4.61 [en] (Win95; U) X-Accept-Language: en-US,en-GB,en,ja MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: help with a bit stream.... References: <38E0FCF9 DOT AB82C211 AT gtcom DOT net> <38E102BB DOT 263A7CAD AT mtu-net DOT ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 44 Date: Tue, 28 Mar 2000 17:24:16 -0500 NNTP-Posting-Host: 12.6.67.181 X-Trace: eagle.america.net 954282383 12.6.67.181 (Tue, 28 Mar 2000 17:26:23 EST) NNTP-Posting-Date: Tue, 28 Mar 2000 17:26:23 EST Organization: 24hoursupport.com To: djgpp AT Delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > > Krogg wrote: > > > > I can open FILEs and read them one byte at a time but i > > really want to read them one BIT at a time...Is there > > a nice way to do this?... "Alexei A. Frounze" wrote: > > Yes, it is. > > For getting Nth bit you must: > 1. read (N/8)th byte from the file > 2. shift the byte (N%8) times right > 3. the lower bit of the result is your Nth bit > This doesnt help...I want to just seewhat the next bit in a file is,with out having to worry about reading in a byte and keeping up with witch bits of that byte i have allready looked at and fetching a new when i need one...I did find some code in the snippits collection that has some functions for opening a file and returning whatever the next bit is...I guess i will end up chopping up that code and using it for my purposes,even if that means i got to use my OWN brain.... BUt if anyone has aready done this and wants to share thier work,that would be cool too.... I want AUTO-MAGIC powers.... |"""""<`.THE PRINCE ,'>"""""""""""""""""""""""""""""""""""| | `.`/""""""\,',' my sig is too big, | |SEE HIS ( / \ \' SEE HIS but its really cool. | | FACE \/<> <>\/ SMILE | | / W \ Visit my ascii art site: | | ,'\_|||||_/`. http://www.gtcom.net/~krogg/ascii/ | | ,',' ||| `.`. krogg DOT no DOT to DOT spam AT gtcom DOT net | |____<,' TIME TO DIE `.>____Remove no.to.spam to reply____|