In my game(which is multiplayer, in a style similar to FPS'), I'm making a system which the server uploads the map to the client upon connection. The server-client system is made using websockets, and I've managed to build said uploading system already, but theres this one problem: the map file is converted to base64 before being sent, and base64 increases filesize by up to 50%, thus the upload is much slower(And I need to convert the file to some type of string before sending, because working with streams, buffers,etc in this case would be much harder and/or require me changing the module I'm using for the server, thus changing the whole structure).
Is there any alternative to base64 encoding in nodejs, that works for my case? Or any way to reduce string size of something converted to base64?
Is there any alternative to base64 encoding in nodejs, that works for my case? Or any way to reduce string size of something converted to base64?