0

Why: I have a multiplayer game and am trying to reduce bandwidth. It's not that my game uses a lot of bandwidth, it's just that I want low-performance devices to be able to run the game better, reduce my host computer's bandwidth, and reduce backpressure lags.

Technical: I am using a nodejs server and sending a javascript object to clients via websocket. I am currently using jsonpack, which is basically an alternatives form of JSON.stringify to convert my object to a string. Once it is sent to the client, I use jsonpack to parse it back into an object.

Question: What is the best way to compress an object into a string so that it is as small as possible? The solution will need to work for both nodejs and browser js.

cs6413110
  • 69
  • 6

0 Answers0