The issue was that on windows any `\n` byte would be written as `\r\n` which corrupts the data, unless `std::ios::binary` is provided.
The issue was that on windows any `\n` byte would be written as `\r\n` which corrupts the data, unless `std::ios::binary` is provided.