I am trying to write binary file using std::ofstream::write method. I found out, that some characters are not written as they are, for example:
std::ofstream::write
You opened the file in text mode and running on Windows. It adds the 0x0d to 0x0a. You need to use binary mode when you create the ofstream instance.
0x0d
0x0a