There is a client on java, a wav file is sent from it to the c ++ server.
How to correctly write the received data to a file if the server accepts values in the char array. If you write it, the file size will be 50 times smaller than the size of the received data, if you write the array character by character, then only noise will be in wav, but if you send this char back to the client and write there, then everything is fine.
How do char translate to byte or how to write char so that everything is playing normally?