// // Programmer: Craig Stuart Sapp // Creation Date: Fri May 1 20:00:52 PDT 1998 // Last Modified: Fri May 1 20:00:56 PDT 1998 // Last Modified: Wed Feb 21 15:48:18 PST 2001 (state = 0 added to constructor) // Filename: ...sig/code/base/BitFileIn/BitFileIn.h // Syntax: C++ // #ifndef _BITFILEIN_H_INCLUDED #define _BITFILEIN_H_INCLUDED #ifndef OLDCPP #include using namespace std; #else #include #endif class BitFileIn : public ifstream { public: BitFileIn (void); #ifndef OLDCPP BitFileIn (const char* filename, ios::openmode state); #else BitFileIn (const char* filename, int state = 0); #endif ~BitFileIn (); long readBits (int bitCount); int valid (void); protected: int bitsInByte;// num of temp stored bits in storage unsigned char inStorage; // temporary storage for output int endoffile; // true if at end of file void setBit (int& output, int bitCount, int bit); int getBit (void); }; #endif /* _BITFILEIN_H_INCLUDED */ // md5sum: 30386f45630bf91d0bb210ae3a958a94 BitFileIn.h [20050403]