#include using namespace std; struct BFILE { FILE* file; int bitCount, theByte, readAhead1, readAhead2; BFILE(FILE* f) { file = f; bitCount = 0; theByte = 0; } }; BFILE* openBinaryFileWrite(const char* filename); void writeBit(BFILE* f, int b); void writeByte(BFILE* f, int b); void closeBinaryFileWrite(BFILE*& f); BFILE* openBinaryFileRead(const char* filename); int readBit(BFILE* f); int readByte(BFILE* f); void closeBinaryFileRead(BFILE*& f);