//fbitios.h #ifndef FBITIOS_H #define FBITIOS_H #include #include #include #include #include #include #include using namespace std; typedef unsigned int ui; typedef unsigned long ul; typedef unsigned char uc; class bitFileIO{ private: bitset<32> ins; bitset<32> outs; fstream ifs, ofs; int ins_pos; int outs_pos; int progress_indicator; enum { max_bits = 32 }; public: bitFileIO ( char *argv_in, char *argv_out ); //constructors bitFileIO :: bitFileIO( char *argv_out, int in_out ); int inputBit(); //input one bit from file void outputBit( int bit ); //output one bit to file long inputBits( int n ); //input n bits from file void outputBits ( ul data, int n ); //output n bits to file void closeOutput(); //close_output void closeInput(); //close input }; #endif