Mail Archives: djgpp/2000/03/29/00:32:51
>
> 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____|
- Raw text -