🙁 This is going to be a pita
Not if done right. If you are doing bitwise operations, I recommend the following.
1. Your file usage flow should look something like this open file->load file into a buffer (unless it is too big)->close file->modify buffer, performing all bit operations you like->write the buffer to the file/new file.
I do not recommend a open file->until finished(read byte->write byte)->close file. That just results in WAY too many gets and prints which ends up being slower then it should be. You are most likely not going to run out of memory, so you might as well use it. (plus the first method opens itself quite nicely to an async file io setup...)
2. If the specific bits mean something (they should if you are modifying them) use an enums or macros. They are great tools for making an unreadable bitwise operations much more readable, ie
flags = isHere | wasthere | wantThere;
Much better then
flags = 0x1 | 0x2 | 0x4;
or worse
flags = 0x7;
Don't worry about operator performance here. compilers are smart enough to combine everything so that the extra |s disappear.
3. Learn what the different bitwise operators do/can do. Specifically, you might want to read
http://graphics.stanford.edu/~seander/bithacks.html You can do some amazing stuff without branching. ie count the number of 1s in a 32 bit word (seriously, you don't need ifs whiles, or loops to do this, and the code is just about as long to write.)