I need to do many manipulations on a file on a bit level. Is there a better way to do this than: (1)open the file in input mode (2)open a second file in output mode (3)read the input file as a string (4)individually convert each character of this string to its binary (ascii/utf-8) value and append/write this to the output file (5)do manipulations on the output file (6) manually convert the output file back by reading the output file as a string 8 “boolean” characters at a time and turning it into an ascii/utf-8 value.