Hi All,
I'm currently doing this code for a flash swf file format, and it deals a lot with bit by bit data....so for example the header format would be:

F,W,S [char]
version [unsigned int]
x bits for sizes A,B,C,D
A,B,C,D of bit size x (from line above)

So as I read byte by byte I was wondering if there is a tidy way of reading data on the per bit data...or as I'm thinking of doing it is reading the whole lot into a single buffer and use lots of shift operators to sort things...but it seems a bit messy and wondered if there was any good ideas or example using the standard librarys.

Thanks,

Ben