Is there a way to read bits for bits from a file and then write bit for bit to a file in c++?